Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- CookielessHelper.cs
- Validator.cs
- HttpProfileGroupBase.cs
- StubHelpers.cs
- DropSourceBehavior.cs
- WebPartTracker.cs
- TypePresenter.xaml.cs
- HTTPNotFoundHandler.cs
- EnumValAlphaComparer.cs
- PathGradientBrush.cs
- VirtualStackFrame.cs
- TextParagraphProperties.cs
- ToolboxItemFilterAttribute.cs
- Config.cs
- AudienceUriMode.cs
- ClientCredentials.cs
- Visual.cs
- XmlDocumentSerializer.cs
- ConfigurationManagerHelperFactory.cs
- Menu.cs
- DocumentXPathNavigator.cs
- XmlAttributeHolder.cs
- XmlSchemaGroupRef.cs
- SafeMarshalContext.cs
- Sorting.cs
- StrongNameUtility.cs
- RegistryKey.cs
- DataControlFieldHeaderCell.cs
- GrammarBuilder.cs
- XmlObjectSerializerReadContext.cs
- DataGridViewAccessibleObject.cs
- ToolStripSplitStackLayout.cs
- ExpressionBindingCollection.cs
- NonDualMessageSecurityOverHttpElement.cs
- XPathSingletonIterator.cs
- ListViewInsertedEventArgs.cs
- WebPartsPersonalization.cs
- WebPartTransformer.cs
- UiaCoreTypesApi.cs
- ImageFormat.cs
- GridViewColumn.cs
- WizardSideBarListControlItemEventArgs.cs
- AssemblyBuilder.cs
- QilValidationVisitor.cs
- XPathLexer.cs
- ListControlActionList.cs
- HttpPostProtocolImporter.cs
- CollectionEditorDialog.cs
- InstancePersistenceContext.cs
- SerTrace.cs
- PipelineComponent.cs
- SQLBoolean.cs
- CornerRadius.cs
- TypeInfo.cs
- ListViewHitTestInfo.cs
- PrintController.cs
- HttpWebRequest.cs
- VariableQuery.cs
- ImageListStreamer.cs
- ExpandedWrapper.cs
- CodeAssignStatement.cs
- GPStream.cs
- OutgoingWebRequestContext.cs
- BypassElement.cs
- DrawingAttributes.cs
- VisualBrush.cs
- CleanUpVirtualizedItemEventArgs.cs
- ProfileServiceManager.cs
- UriWriter.cs
- AssemblyCollection.cs
- DataTable.cs
- AliasGenerator.cs
- WebScriptEnablingBehavior.cs
- RPIdentityRequirement.cs
- XmlReturnReader.cs
- AuthenticateEventArgs.cs
- BevelBitmapEffect.cs
- XmlSiteMapProvider.cs
- WithParamAction.cs
- GeneralTransform3DGroup.cs
- SecurityDescriptor.cs
- Part.cs
- TableLayoutSettings.cs
- HtmlInputControl.cs
- NTAccount.cs
- LazyTextWriterCreator.cs
- Object.cs
- ChannelManager.cs
- TreeViewTemplateSelector.cs
- PersonalizationDictionary.cs
- PermissionSetEnumerator.cs
- RoamingStoreFileUtility.cs
- WriteableBitmap.cs
- XmlUTF8TextWriter.cs
- WebPartAddingEventArgs.cs
- MailSettingsSection.cs
- ColumnTypeConverter.cs
- TextWriterTraceListener.cs
- CompositionCommandSet.cs
- BroadcastEventHelper.cs