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
- SelfIssuedSamlTokenFactory.cs
- ImageField.cs
- DragCompletedEventArgs.cs
- UserUseLicenseDictionaryLoader.cs
- CriticalFinalizerObject.cs
- Decimal.cs
- ClassDataContract.cs
- sitestring.cs
- IIS7ConfigurationLoader.cs
- TagPrefixCollection.cs
- OleDbConnection.cs
- ContentElement.cs
- ListItemParagraph.cs
- StorageSetMapping.cs
- Popup.cs
- Internal.cs
- PagerSettings.cs
- ConnectivityStatus.cs
- GeneralTransformCollection.cs
- SafeBitVector32.cs
- EncodingInfo.cs
- AmbientValueAttribute.cs
- NotifyCollectionChangedEventArgs.cs
- InstanceKeyNotReadyException.cs
- _NtlmClient.cs
- BitmapEffect.cs
- SelectionItemPattern.cs
- WSTransactionSection.cs
- ReadOnlyAttribute.cs
- CodeDirectiveCollection.cs
- Label.cs
- BStrWrapper.cs
- GridViewColumnHeader.cs
- RawAppCommandInputReport.cs
- CurrentTimeZone.cs
- BorderGapMaskConverter.cs
- TemplateEditingFrame.cs
- RecordsAffectedEventArgs.cs
- StrongNameKeyPair.cs
- SinglePhaseEnlistment.cs
- Compilation.cs
- PreservationFileWriter.cs
- Connector.cs
- DeflateEmulationStream.cs
- TakeQueryOptionExpression.cs
- LockedActivityGlyph.cs
- mda.cs
- ClientConfigPaths.cs
- MultipartContentParser.cs
- BuildProvidersCompiler.cs
- SubqueryRules.cs
- Grant.cs
- InkCanvasSelectionAdorner.cs
- PEFileEvidenceFactory.cs
- DataBoundControlParameterTarget.cs
- InsufficientExecutionStackException.cs
- IisTraceListener.cs
- LOSFormatter.cs
- ValueChangedEventManager.cs
- DataListItemCollection.cs
- Image.cs
- WebBrowser.cs
- WebResponse.cs
- AggregateNode.cs
- ImageFormatConverter.cs
- Scheduler.cs
- DataGridTable.cs
- SimpleWorkerRequest.cs
- BaseHashHelper.cs
- SerializableAttribute.cs
- ProfileGroupSettingsCollection.cs
- Camera.cs
- ConfigurationSectionGroupCollection.cs
- Transform3DCollection.cs
- InitiatorSessionSymmetricMessageSecurityProtocol.cs
- Transform.cs
- AxHost.cs
- DiffuseMaterial.cs
- PartialArray.cs
- UnmanagedMemoryStream.cs
- RulePatternOps.cs
- ToolStripContentPanelRenderEventArgs.cs
- DesignerVerb.cs
- DataReceivedEventArgs.cs
- SafeWaitHandle.cs
- RbTree.cs
- EncoderExceptionFallback.cs
- SchemaImporterExtension.cs
- RequestContext.cs
- TimeoutException.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- HtmlInputImage.cs
- ObjectListCommandCollection.cs
- TreeViewEvent.cs
- ClientScriptManager.cs
- DataGridViewControlCollection.cs
- PathGradientBrush.cs
- _ListenerRequestStream.cs
- EntryIndex.cs
- DataGridRelationshipRow.cs