Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- QilInvoke.cs
- FixedPageProcessor.cs
- GridViewAutomationPeer.cs
- ResXResourceReader.cs
- PolicyLevel.cs
- SelectorAutomationPeer.cs
- ContainerVisual.cs
- DataGridSortCommandEventArgs.cs
- DataRowExtensions.cs
- TileModeValidation.cs
- EndEvent.cs
- TableItemProviderWrapper.cs
- UnicodeEncoding.cs
- PointHitTestResult.cs
- TextEditorTables.cs
- ToolStripGrip.cs
- Vector3DConverter.cs
- Model3DCollection.cs
- Control.cs
- IncrementalReadDecoders.cs
- QuaternionAnimationUsingKeyFrames.cs
- RegexReplacement.cs
- AppearanceEditorPart.cs
- RoutedUICommand.cs
- ConfigurationSectionCollection.cs
- LineServicesCallbacks.cs
- UserControlCodeDomTreeGenerator.cs
- XmlWriter.cs
- SoapAttributeOverrides.cs
- StylusPlugin.cs
- Separator.cs
- ToolboxItem.cs
- GetPageCompletedEventArgs.cs
- CellParagraph.cs
- GregorianCalendarHelper.cs
- TextParaClient.cs
- AssemblyBuilder.cs
- CheckBox.cs
- DataGridViewAdvancedBorderStyle.cs
- InputLanguageProfileNotifySink.cs
- ToolBarPanel.cs
- HttpListenerRequest.cs
- XmlCollation.cs
- BeginStoryboard.cs
- AuthenticatingEventArgs.cs
- PublishLicense.cs
- XomlCompilerError.cs
- BitmapEffectGroup.cs
- LockCookie.cs
- SynchronizedDispatch.cs
- LongSumAggregationOperator.cs
- IntellisenseTextBox.cs
- SmiXetterAccessMap.cs
- EditorBrowsableAttribute.cs
- StateDesigner.CommentLayoutGlyph.cs
- Bits.cs
- EnumDataContract.cs
- TearOffProxy.cs
- DesignerWithHeader.cs
- DynamicObject.cs
- RegexWriter.cs
- InkCanvasAutomationPeer.cs
- GeometryGroup.cs
- Rectangle.cs
- NaturalLanguageHyphenator.cs
- DataContext.cs
- ConfigsHelper.cs
- MemberCollection.cs
- _NetRes.cs
- ObjectItemAssemblyLoader.cs
- AppDomainManager.cs
- AsymmetricSecurityProtocol.cs
- IOException.cs
- DependencyObject.cs
- ComplexTypeEmitter.cs
- WindowCollection.cs
- Empty.cs
- String.cs
- InternalConfigEventArgs.cs
- CommonGetThemePartSize.cs
- ConstructorBuilder.cs
- Point3DAnimation.cs
- ValidationSummary.cs
- Button.cs
- GridViewCancelEditEventArgs.cs
- CompilerScope.Storage.cs
- ObjectStateFormatter.cs
- InternalConfigEventArgs.cs
- OdbcFactory.cs
- BamlMapTable.cs
- Permission.cs
- OutputCacheSettingsSection.cs
- NonSerializedAttribute.cs
- CheckBoxStandardAdapter.cs
- ValidationPropertyAttribute.cs
- DataGridViewRowsAddedEventArgs.cs
- UrlAuthorizationModule.cs
- TextLine.cs
- PtsHelper.cs
- ShowExpandedMultiValueConverter.cs