Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- KnownBoxes.cs
- DependencyPropertyConverter.cs
- MsmqReceiveHelper.cs
- StylusDownEventArgs.cs
- TreeNodeBinding.cs
- ButtonChrome.cs
- ContractType.cs
- SmiContextFactory.cs
- CodeDOMUtility.cs
- TypeUnloadedException.cs
- PropertyRef.cs
- LateBoundBitmapDecoder.cs
- EncoderFallback.cs
- WmlPhoneCallAdapter.cs
- _Win32.cs
- OSFeature.cs
- ListContractAdapter.cs
- TextDpi.cs
- UndirectedGraph.cs
- IteratorDescriptor.cs
- DataGridCellAutomationPeer.cs
- BrowserTree.cs
- NativeMethodsOther.cs
- SegmentInfo.cs
- COAUTHINFO.cs
- ClientProxyGenerator.cs
- RemoteWebConfigurationHostStream.cs
- ListSourceHelper.cs
- DockProviderWrapper.cs
- BCLDebug.cs
- DragEvent.cs
- StylusButton.cs
- LambdaCompiler.Expressions.cs
- mediaclock.cs
- ScrollBar.cs
- BinaryUtilClasses.cs
- ContextMarshalException.cs
- cryptoapiTransform.cs
- versioninfo.cs
- MenuAdapter.cs
- PenContexts.cs
- XmlSchemaAttributeGroupRef.cs
- SecurityUtils.cs
- WebPartHeaderCloseVerb.cs
- webeventbuffer.cs
- DataTableReaderListener.cs
- BamlTreeUpdater.cs
- DeviceFilterDictionary.cs
- FrameworkContextData.cs
- MessageQueueInstaller.cs
- ForEachDesigner.xaml.cs
- Parallel.cs
- GridLengthConverter.cs
- LinqToSqlWrapper.cs
- ExpressionBindingCollection.cs
- IconBitmapDecoder.cs
- PropertiesTab.cs
- AstTree.cs
- SimpleLine.cs
- GeometryModel3D.cs
- securestring.cs
- StyleCollection.cs
- TabOrder.cs
- DateTimeFormat.cs
- WorkflowNamespace.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- EncoderParameter.cs
- HitTestParameters.cs
- IndentedWriter.cs
- DecoderFallbackWithFailureFlag.cs
- AnnotationComponentChooser.cs
- TabControlCancelEvent.cs
- CompareInfo.cs
- InvalidDataException.cs
- PathStreamGeometryContext.cs
- StorageModelBuildProvider.cs
- DateTimeOffsetAdapter.cs
- CodeBlockBuilder.cs
- NewItemsContextMenuStrip.cs
- PointAnimationUsingKeyFrames.cs
- EnumValidator.cs
- CodeObject.cs
- WebPartMovingEventArgs.cs
- CheckBoxField.cs
- TextServicesContext.cs
- UnknownBitmapDecoder.cs
- EntityDataSourceColumn.cs
- VisemeEventArgs.cs
- ColumnMapTranslator.cs
- _IPv6Address.cs
- ColumnResult.cs
- HttpApplicationStateBase.cs
- ImmutableDispatchRuntime.cs
- FillRuleValidation.cs
- PieceDirectory.cs
- DataGridDesigner.cs
- ApplicationDirectoryMembershipCondition.cs
- MailWebEventProvider.cs
- SR.cs
- StringArrayEditor.cs