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
- MethodBuilderInstantiation.cs
- EntityDataReader.cs
- DefaultValueAttribute.cs
- FormClosedEvent.cs
- ControlCodeDomSerializer.cs
- TryExpression.cs
- QueryCursorEventArgs.cs
- HttpCapabilitiesEvaluator.cs
- ParserStack.cs
- InkCollectionBehavior.cs
- ToolStripSettings.cs
- XamlWriterExtensions.cs
- XmlCharCheckingWriter.cs
- Item.cs
- ColorTranslator.cs
- BuildManagerHost.cs
- StorageMappingItemLoader.cs
- MultipartContentParser.cs
- LinearGradientBrush.cs
- Drawing.cs
- Camera.cs
- HtmlInputText.cs
- PeerObject.cs
- MethodBuilder.cs
- MenuScrollingVisibilityConverter.cs
- AutomationIdentifier.cs
- ListViewAutomationPeer.cs
- CryptoApi.cs
- MultiSelectRootGridEntry.cs
- XmlSchemaChoice.cs
- XmlSchemaExternal.cs
- ChildTable.cs
- TextBoxView.cs
- CancellationState.cs
- DataRelationPropertyDescriptor.cs
- SHA1Managed.cs
- ActivityBuilderHelper.cs
- Ray3DHitTestResult.cs
- InstanceContext.cs
- AssemblyNameUtility.cs
- HotSpotCollection.cs
- EasingKeyFrames.cs
- TemplateControl.cs
- PrintPreviewDialog.cs
- EndpointConfigContainer.cs
- XmlNamedNodeMap.cs
- FileSystemInfo.cs
- BrowserTree.cs
- InstanceOwnerQueryResult.cs
- WizardPanelChangingEventArgs.cs
- EventLogEntryCollection.cs
- DataSourceCacheDurationConverter.cs
- Mapping.cs
- ProbeDuplexCD1AsyncResult.cs
- XPathAncestorIterator.cs
- IsolatedStorageFilePermission.cs
- objectresult_tresulttype.cs
- FrameworkElement.cs
- Switch.cs
- ProfileSettingsCollection.cs
- WebSysDescriptionAttribute.cs
- EventBuilder.cs
- EventLogInformation.cs
- HebrewNumber.cs
- AsyncContentLoadedEventArgs.cs
- ImageSourceConverter.cs
- BamlTreeNode.cs
- TransactionContextValidator.cs
- XmlDictionaryString.cs
- StructuralObject.cs
- XhtmlBasicTextViewAdapter.cs
- DataGridTable.cs
- WinFormsComponentEditor.cs
- NavigationProperty.cs
- QilInvokeLateBound.cs
- DatePicker.cs
- ComponentChangingEvent.cs
- CustomError.cs
- ApplicationHost.cs
- ListDataHelper.cs
- CheckoutException.cs
- Vector3DCollectionConverter.cs
- PropertyPathConverter.cs
- VerificationException.cs
- ChannelPool.cs
- WmpBitmapEncoder.cs
- PropertyStore.cs
- MTConfigUtil.cs
- TextFormatterImp.cs
- SqlNamer.cs
- SortedSet.cs
- UnsafeNetInfoNativeMethods.cs
- PostBackOptions.cs
- UInt64.cs
- sqlstateclientmanager.cs
- ExpressionBuilder.cs
- Geometry3D.cs
- DataConnectionHelper.cs
- TransformerTypeCollection.cs
- DataGridViewColumnEventArgs.cs