Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / System / Windows / Markup / StyleModeStack.cs / 1 / StyleModeStack.cs
using System; using System.Xml; using System.IO; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; #if PBTCOMPILER namespace MS.Internal.Markup #else namespace System.Windows.Markup #endif { internal enum StyleMode : byte { Base, // Style/Template tag, simple and top level complex properties TargetTypeProperty, // Target type complex property under a Style/Template BasedOnProperty, // BasedOn complex property under a Style/Template DataTypeProperty, // Data type complex property under a Template ComplexProperty, // Reading an allowed complex property under a Template Resources, // Resources complex property under a Style Setters, // Style.Setters IList complex property and subtree Key, // x:Key subtree when Style is used in a dictionary TriggerBase, // Style.TriggerBase complex property and subtree TriggerActions, // When in the middle of parsing EventTrigger.TriggerActions TriggerSetters, // When in the middle of parsing property trigger Setters collection TriggerEnterExitActions, // Trigger.EnterActions or Trigger.ExitActions VisualTree, // FrameworkTemplate.VisualTree's subtree } internal class StyleModeStack { internal StyleModeStack() { Push(StyleMode.Base); } internal int Depth { get { return _stack.Count - 1; } } internal StyleMode Mode { get { Debug.Assert(Depth >= 0, "StyleModeStack's depth was " + Depth + ", should be >= 0"); return _stack.Peek(); } } internal void Push (StyleMode mode) { _stack.Push(mode); } internal void Push () { Push(Mode); } internal StyleMode Pop() { Debug.Assert(Depth >= 0, "StyleMode::Pop() with depth of " + Depth + ", should be >= 0"); return _stack.Pop(); } private Stack_stack = new Stack (64); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Xml; using System.IO; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; #if PBTCOMPILER namespace MS.Internal.Markup #else namespace System.Windows.Markup #endif { internal enum StyleMode : byte { Base, // Style/Template tag, simple and top level complex properties TargetTypeProperty, // Target type complex property under a Style/Template BasedOnProperty, // BasedOn complex property under a Style/Template DataTypeProperty, // Data type complex property under a Template ComplexProperty, // Reading an allowed complex property under a Template Resources, // Resources complex property under a Style Setters, // Style.Setters IList complex property and subtree Key, // x:Key subtree when Style is used in a dictionary TriggerBase, // Style.TriggerBase complex property and subtree TriggerActions, // When in the middle of parsing EventTrigger.TriggerActions TriggerSetters, // When in the middle of parsing property trigger Setters collection TriggerEnterExitActions, // Trigger.EnterActions or Trigger.ExitActions VisualTree, // FrameworkTemplate.VisualTree's subtree } internal class StyleModeStack { internal StyleModeStack() { Push(StyleMode.Base); } internal int Depth { get { return _stack.Count - 1; } } internal StyleMode Mode { get { Debug.Assert(Depth >= 0, "StyleModeStack's depth was " + Depth + ", should be >= 0"); return _stack.Peek(); } } internal void Push (StyleMode mode) { _stack.Push(mode); } internal void Push () { Push(Mode); } internal StyleMode Pop() { Debug.Assert(Depth >= 0, "StyleMode::Pop() with depth of " + Depth + ", should be >= 0"); return _stack.Pop(); } private Stack _stack = new Stack (64); } } // 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
- ValidatorCompatibilityHelper.cs
- SoapIncludeAttribute.cs
- ShaderEffect.cs
- PropertyOrder.cs
- DataTableNewRowEvent.cs
- Bits.cs
- ConstraintStruct.cs
- CompModSwitches.cs
- MsmqIntegrationMessageProperty.cs
- UnsignedPublishLicense.cs
- CorrelationKey.cs
- StructuredProperty.cs
- CodeSnippetCompileUnit.cs
- VisualStyleRenderer.cs
- FamilyTypefaceCollection.cs
- SdlChannelSink.cs
- AxisAngleRotation3D.cs
- ProjectedSlot.cs
- CompressStream.cs
- Preprocessor.cs
- ToolStripDropDownDesigner.cs
- PathFigureCollectionConverter.cs
- TextServicesDisplayAttribute.cs
- DoubleCollectionConverter.cs
- SiblingIterators.cs
- RuleSet.cs
- MultiView.cs
- TreePrinter.cs
- CounterSet.cs
- KeyGestureConverter.cs
- SequentialUshortCollection.cs
- QuaternionRotation3D.cs
- DomainLiteralReader.cs
- SizeValueSerializer.cs
- DataGridColumnsPage.cs
- UInt64Storage.cs
- TextBoxBase.cs
- InternalDispatchObject.cs
- MobileSysDescriptionAttribute.cs
- ManipulationVelocities.cs
- RepeaterDataBoundAdapter.cs
- XmlSchemaResource.cs
- FixedPosition.cs
- OuterGlowBitmapEffect.cs
- SynchronousReceiveElement.cs
- X509Certificate2Collection.cs
- ListViewContainer.cs
- sqlser.cs
- UidManager.cs
- SchemaUtility.cs
- XmlConvert.cs
- CatchBlock.cs
- ApplicationActivator.cs
- ApplicationProxyInternal.cs
- RevocationPoint.cs
- EntityDataSourceState.cs
- ManifestResourceInfo.cs
- FloaterParagraph.cs
- SubstitutionList.cs
- QuaternionAnimationUsingKeyFrames.cs
- DescendantBaseQuery.cs
- CookieProtection.cs
- PageCodeDomTreeGenerator.cs
- PrintSchema.cs
- AnnotationHighlightLayer.cs
- XmlSchemaObject.cs
- TemplatePagerField.cs
- MbpInfo.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- bidPrivateBase.cs
- ReliabilityContractAttribute.cs
- ProtocolsSection.cs
- CodeGenerator.cs
- _SpnDictionary.cs
- DiscoveryClientReferences.cs
- WebConfigurationManager.cs
- BeginEvent.cs
- EndpointBehaviorElement.cs
- GridViewCommandEventArgs.cs
- AbstractSvcMapFileLoader.cs
- QueryStringParameter.cs
- EntityDataSourceDataSelection.cs
- TableRowCollection.cs
- RuleSetBrowserDialog.cs
- CornerRadiusConverter.cs
- XmlSchemaAnyAttribute.cs
- MetadataItemEmitter.cs
- EventListener.cs
- PassportAuthenticationEventArgs.cs
- ProcessInputEventArgs.cs
- DataTemplateKey.cs
- CompositeScriptReference.cs
- ListViewGroupConverter.cs
- List.cs
- PageAdapter.cs
- ProfileInfo.cs
- Errors.cs
- EntityTransaction.cs
- _TransmitFileOverlappedAsyncResult.cs
- DesignerForm.cs