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
- WebPartCloseVerb.cs
- VirtualDirectoryMapping.cs
- CallbackValidatorAttribute.cs
- Util.cs
- _DigestClient.cs
- DataGridViewBand.cs
- CqlParserHelpers.cs
- ServiceHostFactory.cs
- StylusPointProperties.cs
- VersionedStreamOwner.cs
- XmlFormatExtensionAttribute.cs
- TaskResultSetter.cs
- XmlSchemaImport.cs
- QilName.cs
- Misc.cs
- TextBlock.cs
- DataIdProcessor.cs
- BaseValidatorDesigner.cs
- NamedPipeAppDomainProtocolHandler.cs
- XpsFixedPageReaderWriter.cs
- HostDesigntimeLicenseContext.cs
- GPPOINT.cs
- ComplexTypeEmitter.cs
- ComponentResourceKeyConverter.cs
- SourceInterpreter.cs
- ApplicationGesture.cs
- LoginView.cs
- TextSelectionHighlightLayer.cs
- ListParagraph.cs
- ResourceFallbackManager.cs
- SystemIPInterfaceStatistics.cs
- RegexWorker.cs
- MetaTableHelper.cs
- counter.cs
- TextParentUndoUnit.cs
- FixUpCollection.cs
- SafeHandle.cs
- ConfigXmlText.cs
- HttpHostedTransportConfiguration.cs
- TreeNode.cs
- ImageField.cs
- NGCSerializer.cs
- DBAsyncResult.cs
- XmlArrayItemAttributes.cs
- IdleTimeoutMonitor.cs
- GeneralTransform2DTo3DTo2D.cs
- ListDictionaryInternal.cs
- DataGridRowAutomationPeer.cs
- TableLayout.cs
- ArglessEventHandlerProxy.cs
- StrongNamePublicKeyBlob.cs
- ItemAutomationPeer.cs
- XpsException.cs
- ValidationResult.cs
- PathData.cs
- ExpressionServices.cs
- StatusBar.cs
- EntityFrameworkVersions.cs
- LogExtentCollection.cs
- Misc.cs
- Positioning.cs
- GorillaCodec.cs
- ToolStripManager.cs
- DesignSurfaceCollection.cs
- CodeGenerationManager.cs
- WebBrowserNavigatedEventHandler.cs
- IDReferencePropertyAttribute.cs
- FirewallWrapper.cs
- ScriptReferenceEventArgs.cs
- EnumConverter.cs
- Thickness.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- ScrollPattern.cs
- UpdateRecord.cs
- FontFamilyValueSerializer.cs
- EpmCustomContentWriterNodeData.cs
- HighContrastHelper.cs
- BitmapEffectDrawingContextState.cs
- UnmanagedMemoryStreamWrapper.cs
- HttpHandler.cs
- ConnectionString.cs
- ToolBar.cs
- SafeNativeMethodsOther.cs
- DateTimeOffsetAdapter.cs
- MonthChangedEventArgs.cs
- StyleXamlTreeBuilder.cs
- LinkTarget.cs
- TraceFilter.cs
- ListBase.cs
- IdentityManager.cs
- ReadOnlyHierarchicalDataSource.cs
- DesignerActionItem.cs
- TypeNameConverter.cs
- ToolStripItemEventArgs.cs
- DesignRelation.cs
- ScrollBarAutomationPeer.cs
- ComponentResourceKey.cs
- Manipulation.cs
- DecimalConstantAttribute.cs
- AnnotationComponentChooser.cs