Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media3D / ModelUIElement3D.cs / 1 / ModelUIElement3D.cs
//---------------------------------------------------------------------------- // //// Copyright (c) Microsoft Corporation. All rights reserved. // // // Description: // // History: // 4/12/2007: kurtb - Created // //--------------------------------------------------------------------------- using MS.Internal; using MS.Internal.Media; using MS.Internal.Media3D; using System; using System.Diagnostics; using System.Collections.Specialized; using System.ComponentModel; using System.Windows.Automation.Peers; using System.Windows.Media.Composition; using System.Windows.Markup; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { ////// ModelUIElement3D is a UIElement3D which draws the given Model3D. /// ModelUIElement3D is usable from Xaml. /// [ContentProperty("Model")] public sealed class ModelUIElement3D : UIElement3D { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Default ctor /// public ModelUIElement3D() { } #endregion Constructors ////// DependencyProperty which backs the ModelUIElement3D.Content property. /// public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model", /* propertyType = */ typeof(Model3D), /* ownerType = */ typeof(ModelUIElement3D), new PropertyMetadata(ModelPropertyChanged), (ValidateValueCallback) delegate { return MediaContext.CurrentMediaContext.WriteAccessEnabled; }); private static void ModelPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ModelUIElement3D owner = ((ModelUIElement3D) d); // if it's not a subproperty change, then we need to change the protected Model property of Visual3D if (!e.IsASubPropertyChange) { owner.Visual3DModel = (Model3D)e.NewValue; } } ////// The Model3D to render /// public Model3D Model { get { return (Model3D) GetValue(ModelProperty); } set { SetValue(ModelProperty, value); } } ////// Called by the Automation infrastructure when AutomationPeer /// is requested for this element. /// protected override AutomationPeer OnCreateAutomationPeer() { return new UIElement3DAutomationPeer(this); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------------- // //// Copyright (c) Microsoft Corporation. All rights reserved. // // // Description: // // History: // 4/12/2007: kurtb - Created // //--------------------------------------------------------------------------- using MS.Internal; using MS.Internal.Media; using MS.Internal.Media3D; using System; using System.Diagnostics; using System.Collections.Specialized; using System.ComponentModel; using System.Windows.Automation.Peers; using System.Windows.Media.Composition; using System.Windows.Markup; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { ////// ModelUIElement3D is a UIElement3D which draws the given Model3D. /// ModelUIElement3D is usable from Xaml. /// [ContentProperty("Model")] public sealed class ModelUIElement3D : UIElement3D { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Default ctor /// public ModelUIElement3D() { } #endregion Constructors ////// DependencyProperty which backs the ModelUIElement3D.Content property. /// public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model", /* propertyType = */ typeof(Model3D), /* ownerType = */ typeof(ModelUIElement3D), new PropertyMetadata(ModelPropertyChanged), (ValidateValueCallback) delegate { return MediaContext.CurrentMediaContext.WriteAccessEnabled; }); private static void ModelPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ModelUIElement3D owner = ((ModelUIElement3D) d); // if it's not a subproperty change, then we need to change the protected Model property of Visual3D if (!e.IsASubPropertyChange) { owner.Visual3DModel = (Model3D)e.NewValue; } } ////// The Model3D to render /// public Model3D Model { get { return (Model3D) GetValue(ModelProperty); } set { SetValue(ModelProperty, value); } } ////// Called by the Automation infrastructure when AutomationPeer /// is requested for this element. /// protected override AutomationPeer OnCreateAutomationPeer() { return new UIElement3DAutomationPeer(this); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Relationship.cs
- SafeFileMappingHandle.cs
- SQLDateTimeStorage.cs
- SynchronizedInputHelper.cs
- SingleSelectRootGridEntry.cs
- EventHandlerList.cs
- BrushMappingModeValidation.cs
- DataGridColumnCollection.cs
- CodeAttributeArgument.cs
- RuntimeHelpers.cs
- AnchoredBlock.cs
- BufferAllocator.cs
- SqlUtil.cs
- Transform3DGroup.cs
- SqlConnection.cs
- TriggerAction.cs
- WebServiceAttribute.cs
- RuntimeEnvironment.cs
- InternalTypeHelper.cs
- xamlnodes.cs
- ConfigXmlDocument.cs
- CurrentChangedEventManager.cs
- ResourcesChangeInfo.cs
- PasswordDeriveBytes.cs
- PageAsyncTask.cs
- EventLogTraceListener.cs
- ConnectionsZoneDesigner.cs
- CompensationDesigner.cs
- DeviceContexts.cs
- TickBar.cs
- _ProxyChain.cs
- FileStream.cs
- ActivationArguments.cs
- ServiceDefaults.cs
- DisposableCollectionWrapper.cs
- UnsafeCollabNativeMethods.cs
- CommandID.cs
- PathGeometry.cs
- ThreadNeutralSemaphore.cs
- MediaTimeline.cs
- PrintingPermissionAttribute.cs
- RewritingProcessor.cs
- BooleanFunctions.cs
- ActiveDesignSurfaceEvent.cs
- XamlClipboardData.cs
- HostExecutionContextManager.cs
- DesignerFrame.cs
- PropertyChangedEventManager.cs
- ClientSettingsProvider.cs
- ChannelServices.cs
- EmbeddedObject.cs
- IntPtr.cs
- SqlGenerator.cs
- Point3D.cs
- SecurityManager.cs
- SystemParameters.cs
- WriteTimeStream.cs
- CalendarSelectionChangedEventArgs.cs
- FontEmbeddingManager.cs
- MethodCallTranslator.cs
- AnimationClockResource.cs
- BaseTemplateBuildProvider.cs
- SendKeys.cs
- FormsAuthenticationModule.cs
- FrameworkContentElement.cs
- HandlerBase.cs
- MonikerProxyAttribute.cs
- __Filters.cs
- PropertyContainer.cs
- AnimatedTypeHelpers.cs
- HtmlHistory.cs
- EntityDataSourceReferenceGroup.cs
- XmlSerializableWriter.cs
- RadialGradientBrush.cs
- CompositeControl.cs
- NativeActivityFaultContext.cs
- AutoScrollHelper.cs
- InheritanceRules.cs
- TokenBasedSet.cs
- RequestCache.cs
- FunctionDescription.cs
- Dispatcher.cs
- RefExpr.cs
- Command.cs
- InfoCardAsymmetricCrypto.cs
- XPathItem.cs
- HwndStylusInputProvider.cs
- QuadraticBezierSegment.cs
- EventData.cs
- HScrollProperties.cs
- BitmapEffectvisualstate.cs
- FixUp.cs
- DataGridRow.cs
- XmlSerializationReader.cs
- GuidConverter.cs
- NullableConverter.cs
- DataFieldEditor.cs
- IndicFontClient.cs
- BrowserDefinitionCollection.cs
- unsafenativemethodstextservices.cs