Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- InputScopeConverter.cs
- OptionalRstParameters.cs
- DesigntimeLicenseContext.cs
- MenuItemAutomationPeer.cs
- DialogDivider.cs
- RtfToXamlReader.cs
- SmtpMail.cs
- OleDbErrorCollection.cs
- Vars.cs
- AccessViolationException.cs
- TemplateBuilder.cs
- Helpers.cs
- ProtocolImporter.cs
- TextEditorMouse.cs
- ReflectionServiceProvider.cs
- GenericsInstances.cs
- ConnectionsZone.cs
- translator.cs
- XmlQueryStaticData.cs
- HwndTarget.cs
- ListViewCancelEventArgs.cs
- SymDocumentType.cs
- SqlBinder.cs
- SingleAnimationUsingKeyFrames.cs
- ListViewAutomationPeer.cs
- WebPermission.cs
- SqlMetaData.cs
- XsdSchemaFileEditor.cs
- SpecularMaterial.cs
- HttpCacheVaryByContentEncodings.cs
- BroadcastEventHelper.cs
- AppSettingsExpressionBuilder.cs
- DataGridViewEditingControlShowingEventArgs.cs
- WebEncodingValidatorAttribute.cs
- FlatButtonAppearance.cs
- WindowsStreamSecurityUpgradeProvider.cs
- IssuerInformation.cs
- ToolStripSplitStackLayout.cs
- SendKeys.cs
- BamlResourceDeserializer.cs
- RoleGroupCollection.cs
- ArgIterator.cs
- HandlerMappingMemo.cs
- SiteMapSection.cs
- PackagePartCollection.cs
- DiscoveryDocumentReference.cs
- SmiContextFactory.cs
- DecimalAnimationBase.cs
- ReadOnlyAttribute.cs
- InvalidCastException.cs
- DropShadowEffect.cs
- CustomBindingCollectionElement.cs
- DataGridViewMethods.cs
- StaticExtension.cs
- SectionRecord.cs
- ExtentKey.cs
- SoapUnknownHeader.cs
- DataGridViewRowConverter.cs
- WaveHeader.cs
- CallbackWrapper.cs
- TypefaceMap.cs
- OutArgument.cs
- TextBoxBaseDesigner.cs
- OdbcUtils.cs
- TextHintingModeValidation.cs
- ListControlDataBindingHandler.cs
- DataControlLinkButton.cs
- FlowDocumentView.cs
- TraceData.cs
- ReachFixedPageSerializer.cs
- ResourceContainer.cs
- SpellerError.cs
- DSGeneratorProblem.cs
- KeyGesture.cs
- RelativeSource.cs
- SiteMapDataSourceView.cs
- ConnectionPointGlyph.cs
- Stroke.cs
- EnumerableRowCollectionExtensions.cs
- WindowsGraphicsWrapper.cs
- Authorization.cs
- WorkerRequest.cs
- LineServices.cs
- SchemaDeclBase.cs
- FrameworkContentElement.cs
- ExecutedRoutedEventArgs.cs
- PropertyItem.cs
- Thread.cs
- XpsException.cs
- LiteralControl.cs
- ExtendedPropertyCollection.cs
- ExpandedProjectionNode.cs
- ImagingCache.cs
- EntityTypeEmitter.cs
- CodeStatementCollection.cs
- SupportsPreviewControlAttribute.cs
- ScalarConstant.cs
- TypeConverterHelper.cs
- PropertyGridDesigner.cs
- ReferenceService.cs