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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CollectionView.cs
- MgmtConfigurationRecord.cs
- HttpServerProtocol.cs
- EngineSite.cs
- TextRangeSerialization.cs
- StringUtil.cs
- TextPointer.cs
- PackagingUtilities.cs
- DataServiceStreamProviderWrapper.cs
- SqlCaseSimplifier.cs
- __TransparentProxy.cs
- EventLogEntry.cs
- PointAnimationClockResource.cs
- SerializationAttributes.cs
- TextParagraphCache.cs
- MatrixTransform.cs
- _LazyAsyncResult.cs
- XslTransform.cs
- HashCodeCombiner.cs
- FormsAuthenticationModule.cs
- SimpleMailWebEventProvider.cs
- TypeContext.cs
- PackWebRequestFactory.cs
- ConsoleKeyInfo.cs
- WebPartExportVerb.cs
- RunClient.cs
- ButtonPopupAdapter.cs
- TextWriter.cs
- RegisteredHiddenField.cs
- MatrixCamera.cs
- AsyncContentLoadedEventArgs.cs
- FormsAuthenticationConfiguration.cs
- WSMessageEncoding.cs
- WmlTextBoxAdapter.cs
- ToolStrip.cs
- X509UI.cs
- SystemInfo.cs
- GroupDescription.cs
- SmiGettersStream.cs
- StringWriter.cs
- SignatureConfirmationElement.cs
- ServiceDocument.cs
- WindowsToolbarItemAsMenuItem.cs
- XmlUtf8RawTextWriter.cs
- HtmlProps.cs
- DataMisalignedException.cs
- IndexExpression.cs
- TypefaceCollection.cs
- NominalTypeEliminator.cs
- MiniModule.cs
- IisTraceListener.cs
- PageFunction.cs
- LoginView.cs
- DefaultTextStore.cs
- UncommonField.cs
- HttpApplicationFactory.cs
- XmlSchemaSequence.cs
- TogglePattern.cs
- MessageQueuePermissionEntry.cs
- Queue.cs
- DateTimeSerializationSection.cs
- TraceContext.cs
- PrintPreviewDialog.cs
- InlineUIContainer.cs
- HttpRequest.cs
- _LocalDataStoreMgr.cs
- OdbcEnvironment.cs
- BindingNavigator.cs
- CheckBox.cs
- OleCmdHelper.cs
- WebScriptMetadataMessageEncoderFactory.cs
- TakeOrSkipQueryOperator.cs
- Scene3D.cs
- PresentationTraceSources.cs
- HttpCachePolicyElement.cs
- WebConfigurationFileMap.cs
- LassoSelectionBehavior.cs
- ToolboxItemLoader.cs
- ServicePointManagerElement.cs
- NameObjectCollectionBase.cs
- ContourSegment.cs
- Wrapper.cs
- BorderGapMaskConverter.cs
- TreeNodeBinding.cs
- Win32.cs
- Geometry3D.cs
- Misc.cs
- RegexWorker.cs
- DataViewManager.cs
- FixUp.cs
- BasicViewGenerator.cs
- FontWeight.cs
- EventHandlers.cs
- WebPartVerb.cs
- ContextToken.cs
- InheritanceContextChangedEventManager.cs
- RandomNumberGenerator.cs
- mil_sdk_version.cs
- KeyPressEvent.cs
- CharConverter.cs