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
- AmbientLight.cs
- TextRunTypographyProperties.cs
- ContextMenuStrip.cs
- HtmlForm.cs
- ConnectionProviderAttribute.cs
- WebBrowserPermission.cs
- ColorTranslator.cs
- AvTraceDetails.cs
- AnnotationService.cs
- Pen.cs
- IsolatedStorageFile.cs
- RangeValidator.cs
- DbException.cs
- DrawToolTipEventArgs.cs
- ReadOnlyDictionary.cs
- MessageBuffer.cs
- WindowsPrincipal.cs
- ManualResetEvent.cs
- BehaviorEditorPart.cs
- SelectorAutomationPeer.cs
- FocusChangedEventArgs.cs
- HttpException.cs
- NavigatorOutput.cs
- ConfigXmlText.cs
- AssemblyResourceLoader.cs
- SimpleRecyclingCache.cs
- ValidationResult.cs
- TargetFrameworkAttribute.cs
- EncodingStreamWrapper.cs
- PkcsUtils.cs
- SafeProcessHandle.cs
- GeometryConverter.cs
- Msec.cs
- CodeMemberEvent.cs
- DesignOnlyAttribute.cs
- DataControlField.cs
- WindowCollection.cs
- JsonUriDataContract.cs
- WindowsFormsLinkLabel.cs
- ResourcesGenerator.cs
- FileDialogCustomPlacesCollection.cs
- Int32AnimationUsingKeyFrames.cs
- ConfigPathUtility.cs
- SortDescriptionCollection.cs
- DeviceContext2.cs
- CompareValidator.cs
- MetadataArtifactLoaderCompositeFile.cs
- ALinqExpressionVisitor.cs
- ResourceAttributes.cs
- NumericExpr.cs
- EngineSiteSapi.cs
- GenericAuthenticationEventArgs.cs
- CodeExpressionStatement.cs
- DataColumnPropertyDescriptor.cs
- GlyphInfoList.cs
- TransactionContextValidator.cs
- ConfigXmlAttribute.cs
- TextReader.cs
- ErrorLog.cs
- WSAddressing10ProblemHeaderQNameFault.cs
- ToolStripSystemRenderer.cs
- ConnectionConsumerAttribute.cs
- RegexTypeEditor.cs
- NameValueFileSectionHandler.cs
- PeerTransportListenAddressValidatorAttribute.cs
- VScrollBar.cs
- SubMenuStyle.cs
- ClientSideProviderDescription.cs
- ColorAnimation.cs
- XmlSerializationWriter.cs
- ControlBuilderAttribute.cs
- PublisherMembershipCondition.cs
- ColorConvertedBitmapExtension.cs
- WindowsScrollBarBits.cs
- Array.cs
- InstanceDataCollection.cs
- BinaryParser.cs
- TdsParserSessionPool.cs
- FilteredAttributeCollection.cs
- AdapterUtil.cs
- ExpressionBinding.cs
- ImageMap.cs
- FreezableCollection.cs
- WmpBitmapDecoder.cs
- HiddenFieldPageStatePersister.cs
- PreviewKeyDownEventArgs.cs
- OracleCommandSet.cs
- AuthenticationManager.cs
- UriScheme.cs
- StringAnimationBase.cs
- VBIdentifierTrimConverter.cs
- AuthenticationModuleElementCollection.cs
- QuadraticBezierSegment.cs
- ElasticEase.cs
- _NetRes.cs
- XmlUtf8RawTextWriter.cs
- CustomAttributeBuilder.cs
- ObsoleteAttribute.cs
- RMPublishingDialog.cs
- NotifyParentPropertyAttribute.cs