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
- ConnectionsZone.cs
- DataShape.cs
- CodeGroup.cs
- PostBackOptions.cs
- ManageRequest.cs
- Helpers.cs
- CompilerHelpers.cs
- Adorner.cs
- MouseGesture.cs
- MdiWindowListStrip.cs
- FixedSOMPageElement.cs
- ConstructorNeedsTagAttribute.cs
- coordinatorscratchpad.cs
- CipherData.cs
- PropertyDescriptor.cs
- HtmlTableRowCollection.cs
- LabelExpression.cs
- User.cs
- PseudoWebRequest.cs
- TextEditorTyping.cs
- SafeCryptoHandles.cs
- ValidationPropertyAttribute.cs
- OdbcConnectionString.cs
- ClientSettingsProvider.cs
- OLEDB_Util.cs
- CriticalExceptions.cs
- ObjectDataSourceMethodEventArgs.cs
- ContentDefinition.cs
- SimpleRecyclingCache.cs
- LostFocusEventManager.cs
- PickDesigner.xaml.cs
- SliderAutomationPeer.cs
- RelationalExpressions.cs
- InputReferenceExpression.cs
- TrustManager.cs
- TransformPattern.cs
- PresentationSource.cs
- CryptoApi.cs
- DrawingAttributeSerializer.cs
- XmlWriterTraceListener.cs
- PasswordTextNavigator.cs
- ActivationWorker.cs
- TrustLevelCollection.cs
- HierarchicalDataSourceConverter.cs
- WebServiceTypeData.cs
- Faults.cs
- Page.cs
- XmlSerializableWriter.cs
- FlowDocumentScrollViewer.cs
- MarshalByValueComponent.cs
- DataViewSettingCollection.cs
- BamlResourceSerializer.cs
- GradientStop.cs
- UTF8Encoding.cs
- RegexCaptureCollection.cs
- AdapterUtil.cs
- Main.cs
- AddToCollection.cs
- WorkflowShape.cs
- _StreamFramer.cs
- Verify.cs
- SessionPageStateSection.cs
- ModelPropertyCollectionImpl.cs
- DynamicPropertyReader.cs
- BreadCrumbTextConverter.cs
- EncryptionUtility.cs
- DeferredSelectedIndexReference.cs
- ThreadWorkerController.cs
- KeyProperty.cs
- xml.cs
- ProxyWebPart.cs
- ThreadNeutralSemaphore.cs
- AlphaSortedEnumConverter.cs
- CodeMethodInvokeExpression.cs
- TreeBuilderBamlTranslator.cs
- AvtEvent.cs
- RelationshipConverter.cs
- Drawing.cs
- MgmtConfigurationRecord.cs
- HtmlControl.cs
- ResourceFallbackManager.cs
- TogglePatternIdentifiers.cs
- RequestCache.cs
- JavascriptXmlWriterWrapper.cs
- SymDocumentType.cs
- StatusBarItem.cs
- HttpClientCertificate.cs
- CodePageUtils.cs
- HttpVersion.cs
- SqlNotificationRequest.cs
- ClientRolePrincipal.cs
- CompositeControl.cs
- ConnectionProviderAttribute.cs
- Win32MouseDevice.cs
- ArraySegment.cs
- KnownTypesHelper.cs
- WebHostUnsafeNativeMethods.cs
- WebColorConverter.cs
- COMException.cs
- VisualStateManager.cs