Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Markup / StyleModeStack.cs / 1305600 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Point3DAnimation.cs
- Events.cs
- CharKeyFrameCollection.cs
- CharAnimationUsingKeyFrames.cs
- base64Transforms.cs
- PluralizationService.cs
- EditorAttribute.cs
- ShaperBuffers.cs
- AstTree.cs
- ProtocolsConfigurationHandler.cs
- ParallelLoopState.cs
- DocumentXmlWriter.cs
- GridViewCellAutomationPeer.cs
- DropDownButton.cs
- DataGridItem.cs
- XmlKeywords.cs
- LayoutEditorPart.cs
- ScaleTransform.cs
- MarkupCompiler.cs
- XmlNamespaceDeclarationsAttribute.cs
- SingleAnimationBase.cs
- StrongName.cs
- FilterQuery.cs
- _BasicClient.cs
- TdsParameterSetter.cs
- RemotingServices.cs
- HtmlDocument.cs
- AuthStoreRoleProvider.cs
- DataShape.cs
- SchemaImporter.cs
- ChangeBlockUndoRecord.cs
- MinimizableAttributeTypeConverter.cs
- GAC.cs
- BmpBitmapEncoder.cs
- DataControlCommands.cs
- TextViewDesigner.cs
- HideDisabledControlAdapter.cs
- RijndaelManaged.cs
- HttpResponseInternalBase.cs
- MediaContextNotificationWindow.cs
- XPathPatternParser.cs
- X509LogoTypeExtension.cs
- __TransparentProxy.cs
- assemblycache.cs
- BinaryUtilClasses.cs
- PageAdapter.cs
- UndoEngine.cs
- GenericEnumerator.cs
- OperationFormatUse.cs
- RadioButtonRenderer.cs
- PreservationFileWriter.cs
- ClaimSet.cs
- WebEventCodes.cs
- GridItemCollection.cs
- DigitalSignature.cs
- OleDbConnectionFactory.cs
- ConfigXmlWhitespace.cs
- ViewCellSlot.cs
- SoapObjectReader.cs
- Camera.cs
- MimeImporter.cs
- TemplateBuilder.cs
- EmptyControlCollection.cs
- ImageCodecInfo.cs
- ScaleTransform.cs
- SerialPinChanges.cs
- Speller.cs
- AppDomainAttributes.cs
- RealProxy.cs
- MsmqAppDomainProtocolHandler.cs
- AssemblyCacheEntry.cs
- UpdateManifestForBrowserApplication.cs
- ListViewTableRow.cs
- TagPrefixInfo.cs
- BindingNavigator.cs
- DispatcherFrame.cs
- WebConfigurationFileMap.cs
- InternalTypeHelper.cs
- DataGridViewCellStyleChangedEventArgs.cs
- NotImplementedException.cs
- FullTextState.cs
- WebBrowserBase.cs
- SystemIcmpV6Statistics.cs
- TableLayoutPanelCodeDomSerializer.cs
- DataGridItemCollection.cs
- StringDictionary.cs
- UrlPropertyAttribute.cs
- SchemaLookupTable.cs
- XmlSchemaFacet.cs
- TypeElement.cs
- SystemWebSectionGroup.cs
- GridSplitterAutomationPeer.cs
- Style.cs
- ConditionValidator.cs
- UniqueEventHelper.cs
- TextBoxRenderer.cs
- DrawingCollection.cs
- Group.cs
- ToolStripDropTargetManager.cs
- SessionStateSection.cs