Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / Media3D / ModelUIElement3D.cs / 2 / ModelUIElement3D.cs
//---------------------------------------------------------------------------- // //// Copyright (c) Microsoft Corporation. All rights reserved. // // // Description: // // History: // 4/12/2007: [....] - 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FilterQuery.cs
- ToolStripItemDesigner.cs
- DataGridView.cs
- RegisteredDisposeScript.cs
- NotImplementedException.cs
- StsCommunicationException.cs
- WizardForm.cs
- ErrorFormatter.cs
- DataGridCell.cs
- DesignBindingConverter.cs
- ExpanderAutomationPeer.cs
- WebAdminConfigurationHelper.cs
- PrtTicket_Base.cs
- ArraySegment.cs
- ArrayWithOffset.cs
- XmlCharCheckingReader.cs
- HealthMonitoringSectionHelper.cs
- SpellerHighlightLayer.cs
- SHA384Cng.cs
- CharEntityEncoderFallback.cs
- ClientTarget.cs
- ImageUrlEditor.cs
- AsymmetricAlgorithm.cs
- CodeSubDirectory.cs
- EntityKey.cs
- ScrollProviderWrapper.cs
- SchemaHelper.cs
- XmlNode.cs
- CodeExporter.cs
- wgx_commands.cs
- DataError.cs
- DocumentPageViewAutomationPeer.cs
- SchemaInfo.cs
- XXXOnTypeBuilderInstantiation.cs
- UInt16Converter.cs
- XmlElementAttributes.cs
- HttpHandlerActionCollection.cs
- RawStylusActions.cs
- MembershipSection.cs
- QueryContinueDragEvent.cs
- HtmlTernaryTree.cs
- MarkupCompilePass1.cs
- PreProcessInputEventArgs.cs
- UpdateProgress.cs
- TextEditorContextMenu.cs
- ImmutableCommunicationTimeouts.cs
- BatchParser.cs
- UnconditionalPolicy.cs
- DirectoryObjectSecurity.cs
- InstanceDataCollectionCollection.cs
- TypeValidationEventArgs.cs
- _TimerThread.cs
- Column.cs
- SystemResourceHost.cs
- DataGridViewSelectedColumnCollection.cs
- Psha1DerivedKeyGeneratorHelper.cs
- TextSimpleMarkerProperties.cs
- GatewayDefinition.cs
- ProcessManager.cs
- Wildcard.cs
- QilGenerator.cs
- AssociatedControlConverter.cs
- _IPv4Address.cs
- Point.cs
- HighlightOverlayGlyph.cs
- RadioButtonFlatAdapter.cs
- AlternateView.cs
- BrowserCapabilitiesFactoryBase.cs
- Models.cs
- InstrumentationTracker.cs
- ServiceNameElement.cs
- MachineKey.cs
- ArgumentReference.cs
- ObjectListCommand.cs
- BamlWriter.cs
- ResolveCriteriaCD1.cs
- ChangesetResponse.cs
- AuthorizationRuleCollection.cs
- ImageAnimator.cs
- ColorTranslator.cs
- RegistryConfigurationProvider.cs
- QilValidationVisitor.cs
- CodeDelegateInvokeExpression.cs
- wgx_sdk_version.cs
- ColorConverter.cs
- HtmlTableRowCollection.cs
- TextRangeAdaptor.cs
- DateTimeFormatInfoScanner.cs
- ActivityTypeDesigner.xaml.cs
- DeclarativeConditionsCollection.cs
- ViewPort3D.cs
- Helpers.cs
- InvokeMethodActivityDesigner.cs
- NumericPagerField.cs
- StaticSiteMapProvider.cs
- WebDescriptionAttribute.cs
- PreProcessor.cs
- ToolboxBitmapAttribute.cs
- Scalars.cs
- FixedSOMLineCollection.cs