Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WorkflowServiceOperationListItem.cs
- TransformConverter.cs
- GridViewRowEventArgs.cs
- HttpRawResponse.cs
- CommandValueSerializer.cs
- InputLangChangeRequestEvent.cs
- DataGridViewSelectedCellCollection.cs
- ValidatingCollection.cs
- HtmlFormParameterWriter.cs
- Rfc2898DeriveBytes.cs
- ActiveXSite.cs
- Itemizer.cs
- PageHandlerFactory.cs
- SslStreamSecurityElement.cs
- CustomCategoryAttribute.cs
- AnimatedTypeHelpers.cs
- TriggerBase.cs
- XmlImplementation.cs
- OleCmdHelper.cs
- EventLogEntryCollection.cs
- BindingsSection.cs
- ApplicationDirectory.cs
- URLIdentityPermission.cs
- PeerApplicationLaunchInfo.cs
- XslVisitor.cs
- DataListItemCollection.cs
- TileBrush.cs
- CharKeyFrameCollection.cs
- DataListItemEventArgs.cs
- FixUpCollection.cs
- DesignerActionMethodItem.cs
- AliasExpr.cs
- DSASignatureDeformatter.cs
- LogicalExpr.cs
- CatchDesigner.xaml.cs
- BinHexEncoder.cs
- SymbolPair.cs
- PagedDataSource.cs
- MergeLocalizationDirectives.cs
- SchemaNotation.cs
- RsaSecurityToken.cs
- UnsignedPublishLicense.cs
- HyperLink.cs
- EntityDataSourceDataSelection.cs
- Models.cs
- TableSectionStyle.cs
- XmlReflectionMember.cs
- TextServicesManager.cs
- ReferenceEqualityComparer.cs
- EmptyEnumerator.cs
- AstTree.cs
- PrintingPermissionAttribute.cs
- EventLogPermissionEntry.cs
- ValueProviderWrapper.cs
- PrimitiveCodeDomSerializer.cs
- CacheAxisQuery.cs
- ProcessStartInfo.cs
- PropertyOrder.cs
- SimpleType.cs
- ModelItemCollection.cs
- HasCopySemanticsAttribute.cs
- DesignerTransactionCloseEvent.cs
- WindowsStatusBar.cs
- DataControlField.cs
- AttributeSetAction.cs
- BrowserDefinitionCollection.cs
- HtmlButton.cs
- UpdatePanelTrigger.cs
- VScrollProperties.cs
- XPathNodeHelper.cs
- SmiEventSink.cs
- GeneralTransform3D.cs
- DbConnectionStringBuilder.cs
- DbSourceParameterCollection.cs
- _NegoStream.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- namescope.cs
- WebExceptionStatus.cs
- SystemColors.cs
- HttpCapabilitiesBase.cs
- WSFederationHttpBindingElement.cs
- DataAccessException.cs
- GridViewRowCollection.cs
- ContentWrapperAttribute.cs
- DataGridViewComboBoxEditingControl.cs
- SweepDirectionValidation.cs
- TextModifier.cs
- ComponentCommands.cs
- StretchValidation.cs
- DbDataAdapter.cs
- StylusPointPropertyUnit.cs
- columnmapfactory.cs
- WindowsAuthenticationModule.cs
- X509UI.cs
- XPathMultyIterator.cs
- ToolStripItemImageRenderEventArgs.cs
- EDesignUtil.cs
- InlineCategoriesDocument.cs
- CloudCollection.cs
- LocationUpdates.cs