Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / Media3D / MaterialGroup.cs / 1 / MaterialGroup.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: Material group // //--------------------------------------------------------------------------- using System; using System.Collections; using System.Diagnostics; using System.Windows; using System.Windows.Media; using System.Windows.Media.Media3D; using System.Windows.Markup; using MS.Internal; using MS.Internal.Media3D; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { ////// Material group /// [ContentProperty("Children")] public sealed partial class MaterialGroup : Material { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Default constructor. /// public MaterialGroup() {} #endregion Constructors //------------------------------------------------------ // // Public Methods // //----------------------------------------------------- #region Public Methods #endregion Public Methods //------------------------------------------------------ // // Internal Methods // //------------------------------------------------------ #region Internal Methods // If a child changes or is added/removed to this, // that will fire changed which will mark the GeometryModel3D // containing this as DirtyForPreCompute which will // cause PreCompute() to be called on us. // // Thus, we don't need to override OnChanged() and update // _requiresRealization here in MaterialGroup. internal override bool PreCompute() { _requiresRealization = false; MaterialCollection children = Children; if (children != null) { int count = children.Count; for (int i = 0; i < count; i++) { // Can't early exit on first 'true' because PreCompute // does work that's necessary for every Material that // has text in it _requiresRealization |= children.Internal_GetItem(i).PreCompute(); } } return _requiresRealization; } internal override void UpdateRealizations( RealizationContext ctx, ref Rect bounds ) { Debug.Assert(_requiresRealization); MaterialCollection children = Children; if (children != null) { int count = children.Count; for (int i = 0; i < count; i++) { Material material = children.Internal_GetItem(i); if (material.RequiresRealization) { material.UpdateRealizations(ctx, ref bounds); } } } } #endregion Internal Methods //----------------------------------------------------- // // Internal Properties // //------------------------------------------------------ #region Internal Properties internal override bool RequiresRealization { get { return _requiresRealization; } } #endregion Internal Properties //----------------------------------------------------- // // Private Fields // //----------------------------------------------------- #region Private Fields private bool _requiresRealization = false; #endregion Private Fields } } // 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
- IsolatedStorageSecurityState.cs
- MatrixAnimationUsingKeyFrames.cs
- XmlIterators.cs
- ParameterDataSourceExpression.cs
- MediaPlayerState.cs
- SmiSettersStream.cs
- ThreadSafeList.cs
- InitializationEventAttribute.cs
- RegexFCD.cs
- TypeUtil.cs
- MessageOperationFormatter.cs
- VBIdentifierName.cs
- AffineTransform3D.cs
- TextRenderer.cs
- IApplicationTrustManager.cs
- DataGridTablesFactory.cs
- PassportAuthenticationModule.cs
- SimpleHandlerBuildProvider.cs
- WorkflowElementDialog.cs
- HttpModuleActionCollection.cs
- SqlDependencyListener.cs
- MaterialGroup.cs
- securitymgrsite.cs
- ApplicationActivator.cs
- HandlerFactoryWrapper.cs
- ViewStateChangedEventArgs.cs
- DoubleKeyFrameCollection.cs
- AppDomainFactory.cs
- Rijndael.cs
- ComponentChangingEvent.cs
- DesignerMetadata.cs
- ResourceContainer.cs
- FileLoadException.cs
- EventRouteFactory.cs
- AccessViolationException.cs
- ADRoleFactoryConfiguration.cs
- XamlHostingSectionGroup.cs
- InputProcessorProfilesLoader.cs
- HwndMouseInputProvider.cs
- MouseWheelEventArgs.cs
- CellTreeNodeVisitors.cs
- DeferredReference.cs
- ManualResetEvent.cs
- FtpRequestCacheValidator.cs
- CommandPlan.cs
- ScriptControlManager.cs
- ConnectionPointConverter.cs
- WebBrowsableAttribute.cs
- XMLUtil.cs
- GradientBrush.cs
- Pen.cs
- StreamReader.cs
- UICuesEvent.cs
- NegotiationTokenProvider.cs
- ListComponentEditorPage.cs
- EntityProviderFactory.cs
- IMembershipProvider.cs
- DataGridTextBoxColumn.cs
- AspProxy.cs
- TypeDependencyAttribute.cs
- WorkflowLayouts.cs
- BinaryParser.cs
- MouseActionValueSerializer.cs
- CodeMemberMethod.cs
- SafeArchiveContext.cs
- Permission.cs
- EpmContentDeSerializer.cs
- GroupItem.cs
- MenuScrollingVisibilityConverter.cs
- TransportManager.cs
- AstNode.cs
- HttpModulesSection.cs
- PathFigureCollectionConverter.cs
- PKCS1MaskGenerationMethod.cs
- AggregateException.cs
- URL.cs
- Cursor.cs
- ExceptionUtil.cs
- DesignerCapabilities.cs
- DrawListViewSubItemEventArgs.cs
- KerberosTicketHashIdentifierClause.cs
- UnionExpr.cs
- SingleStorage.cs
- MergeFailedEvent.cs
- Point3DAnimation.cs
- FontCacheUtil.cs
- AndAlso.cs
- CroppedBitmap.cs
- OneOfScalarConst.cs
- Command.cs
- AssemblyAttributes.cs
- BoundColumn.cs
- SystemGatewayIPAddressInformation.cs
- BitmapSourceSafeMILHandle.cs
- DesignBindingEditor.cs
- SQLMembershipProvider.cs
- FastEncoderStatics.cs
- ChannelBinding.cs
- ComboBox.cs
- XmlComment.cs