Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Core / CSharp / System / Windows / Media3D / ContainerUIElement3D.cs / 1 / ContainerUIElement3D.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 { ////// ContainerUIElement3D is a UIElement3D which contains children of type Visual3D. /// It does not set the Visual3DModel property. /// [ContentProperty("Children")] public sealed class ContainerUIElement3D : UIElement3D { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Default ctor /// public ContainerUIElement3D() { _children = new Visual3DCollection(this); } #endregion Constructors ////// Derived class must implement to support Visual3D children. The method must return /// the child at the specified index. Index must be between 0 and GetVisual3DChildrenCount-1. /// /// By default a Visual3D does not have any children. /// /// Remark: /// During this virtual call it is not valid to modify the Visual tree. /// protected override Visual3D GetVisual3DChild(int index) { //Visual3DCollection does the range check for index return _children[index]; } ////// Derived classes override this property to enable the Visual3D code to enumerate /// the Visual3D children. Derived classes need to return the number of children /// from this method. /// /// By default a Visual3D does not have any children. /// /// Remark: During this virtual method the Visual tree must not be modified. /// protected override int Visual3DChildrenCount { get { return _children.Count; } } ////// Children of this Visual3D /// [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public Visual3DCollection Children { get { VerifyAPIReadOnly(); return _children; } } ////// Called by the Automation infrastructure when AutomationPeer /// is requested for this element. /// protected override AutomationPeer OnCreateAutomationPeer() { return new UIElement3DAutomationPeer(this); } //------------------------------------------------------ // // Private Fields // //----------------------------------------------------- #region Private Fields private readonly Visual3DCollection _children; #endregion Private Fields } } // 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 { ////// ContainerUIElement3D is a UIElement3D which contains children of type Visual3D. /// It does not set the Visual3DModel property. /// [ContentProperty("Children")] public sealed class ContainerUIElement3D : UIElement3D { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Default ctor /// public ContainerUIElement3D() { _children = new Visual3DCollection(this); } #endregion Constructors ////// Derived class must implement to support Visual3D children. The method must return /// the child at the specified index. Index must be between 0 and GetVisual3DChildrenCount-1. /// /// By default a Visual3D does not have any children. /// /// Remark: /// During this virtual call it is not valid to modify the Visual tree. /// protected override Visual3D GetVisual3DChild(int index) { //Visual3DCollection does the range check for index return _children[index]; } ////// Derived classes override this property to enable the Visual3D code to enumerate /// the Visual3D children. Derived classes need to return the number of children /// from this method. /// /// By default a Visual3D does not have any children. /// /// Remark: During this virtual method the Visual tree must not be modified. /// protected override int Visual3DChildrenCount { get { return _children.Count; } } ////// Children of this Visual3D /// [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public Visual3DCollection Children { get { VerifyAPIReadOnly(); return _children; } } ////// Called by the Automation infrastructure when AutomationPeer /// is requested for this element. /// protected override AutomationPeer OnCreateAutomationPeer() { return new UIElement3DAutomationPeer(this); } //------------------------------------------------------ // // Private Fields // //----------------------------------------------------- #region Private Fields private readonly Visual3DCollection _children; #endregion Private Fields } } // 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
- GridLength.cs
- XmlDigitalSignatureProcessor.cs
- BindingContext.cs
- MDIWindowDialog.cs
- EllipseGeometry.cs
- PersonalizableAttribute.cs
- FormCollection.cs
- ObjectStateFormatter.cs
- DriveNotFoundException.cs
- AncillaryOps.cs
- TypeSystem.cs
- DataGridViewCellCancelEventArgs.cs
- DataGridPageChangedEventArgs.cs
- UpdateManifestForBrowserApplication.cs
- Listbox.cs
- FlowNode.cs
- HtmlLabelAdapter.cs
- ProtectedConfigurationProviderCollection.cs
- SendingRequestEventArgs.cs
- InvalidOleVariantTypeException.cs
- KnownIds.cs
- Ports.cs
- CompilerGlobalScopeAttribute.cs
- Process.cs
- ElementUtil.cs
- EdmProviderManifest.cs
- RootBrowserWindow.cs
- MetadataWorkspace.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- FaultImportOptions.cs
- MulticastNotSupportedException.cs
- VarRefManager.cs
- Marshal.cs
- DirectoryNotFoundException.cs
- TypeNameHelper.cs
- SerialErrors.cs
- InfoCardBaseException.cs
- NotificationContext.cs
- Utils.cs
- MouseDevice.cs
- PrePostDescendentsWalker.cs
- _Rfc2616CacheValidators.cs
- CmsUtils.cs
- lengthconverter.cs
- followingsibling.cs
- XmlSerializerVersionAttribute.cs
- TextTreeTextNode.cs
- FontClient.cs
- SymLanguageType.cs
- ImageList.cs
- FlatButtonAppearance.cs
- ImageAnimator.cs
- DataGridViewRowPostPaintEventArgs.cs
- LinkedResource.cs
- dataSvcMapFileLoader.cs
- WindowsListViewGroup.cs
- DrawListViewSubItemEventArgs.cs
- SettingsBase.cs
- HtmlControl.cs
- DataSourceCacheDurationConverter.cs
- BitmapPalette.cs
- ReadOnlyObservableCollection.cs
- UIAgentRequest.cs
- DirectionalLight.cs
- SolidBrush.cs
- BuilderElements.cs
- TextUtf8RawTextWriter.cs
- Evidence.cs
- ToolStripContentPanel.cs
- DiagnosticsConfiguration.cs
- TabItemWrapperAutomationPeer.cs
- TableCellAutomationPeer.cs
- SoapAttributes.cs
- BuildResultCache.cs
- WindowsListViewGroupSubsetLink.cs
- ViewCellRelation.cs
- RectAnimationBase.cs
- EntityDataSourceContextCreatingEventArgs.cs
- StrongNameIdentityPermission.cs
- ThemeableAttribute.cs
- TemplatedMailWebEventProvider.cs
- AdobeCFFWrapper.cs
- OletxDependentTransaction.cs
- SQLInt32.cs
- EventLogPermissionAttribute.cs
- OAVariantLib.cs
- DataControlField.cs
- Lasso.cs
- CreateUserErrorEventArgs.cs
- DesignerVerb.cs
- SafeNativeMethodsOther.cs
- SingleConverter.cs
- SystemTcpConnection.cs
- Viewport2DVisual3D.cs
- _BasicClient.cs
- MenuItemBindingCollection.cs
- ExpressionsCollectionEditor.cs
- ValueProviderWrapper.cs
- XmlCodeExporter.cs
- ExtensionQuery.cs