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
- DataViewManagerListItemTypeDescriptor.cs
- IpcChannel.cs
- InstanceDescriptor.cs
- ProviderException.cs
- MemberAssignment.cs
- DataGridCommandEventArgs.cs
- ToolStripDropTargetManager.cs
- TextBox.cs
- Accessors.cs
- SharedPersonalizationStateInfo.cs
- CodeDomLocalizationProvider.cs
- CategoryGridEntry.cs
- PerformanceCounterPermissionEntryCollection.cs
- FindCriteriaElement.cs
- InternalEnumValidatorAttribute.cs
- NullExtension.cs
- Sql8ConformanceChecker.cs
- DeadCharTextComposition.cs
- XamlVector3DCollectionSerializer.cs
- DisplayMemberTemplateSelector.cs
- GenericAuthenticationEventArgs.cs
- PathParser.cs
- ToolStripHighContrastRenderer.cs
- NeutralResourcesLanguageAttribute.cs
- SecurityException.cs
- ImportContext.cs
- CheckBoxBaseAdapter.cs
- ApplicationDirectory.cs
- SimpleBitVector32.cs
- AspNetHostingPermission.cs
- GroupBox.cs
- FieldTemplateUserControl.cs
- MessageQueueException.cs
- DeclaredTypeElement.cs
- CommandArguments.cs
- FixUp.cs
- PreviewKeyDownEventArgs.cs
- KeyInfo.cs
- DirtyTextRange.cs
- IsolatedStorage.cs
- Wildcard.cs
- MediaCommands.cs
- SourceFileBuildProvider.cs
- IsolatedStorageFile.cs
- ResXResourceWriter.cs
- ProxyFragment.cs
- MappingMetadataHelper.cs
- FileLogRecordStream.cs
- DockAndAnchorLayout.cs
- ValidationHelper.cs
- Substitution.cs
- GZipStream.cs
- GlobalizationSection.cs
- TlsnegoTokenProvider.cs
- AssemblyFilter.cs
- ListViewItemMouseHoverEvent.cs
- PlatformCulture.cs
- BindingParameterCollection.cs
- WsdlInspector.cs
- CommandEventArgs.cs
- WrapPanel.cs
- SimpleApplicationHost.cs
- XmlLangPropertyAttribute.cs
- DBNull.cs
- TableAutomationPeer.cs
- ReturnType.cs
- RtfToXamlReader.cs
- graph.cs
- Visual3D.cs
- MimeParameters.cs
- XamlToRtfWriter.cs
- DBCSCodePageEncoding.cs
- PageBuildProvider.cs
- SqlInternalConnectionSmi.cs
- PropertyDescriptorGridEntry.cs
- XsdBuilder.cs
- DecoderReplacementFallback.cs
- Vector3D.cs
- WebZone.cs
- CommentEmitter.cs
- OciHandle.cs
- TabPageDesigner.cs
- EntityCommandDefinition.cs
- AddingNewEventArgs.cs
- LookupBindingPropertiesAttribute.cs
- BitmapCache.cs
- StringPropertyBuilder.cs
- SqlClientWrapperSmiStream.cs
- SymDocumentType.cs
- ListControlConvertEventArgs.cs
- DaylightTime.cs
- InternalBufferOverflowException.cs
- WindowVisualStateTracker.cs
- UpdatableGenericsFeature.cs
- InvokeMethodActivity.cs
- DateTimeSerializationSection.cs
- KnownColorTable.cs
- MediaTimeline.cs
- PopOutPanel.cs
- ServiceAuthorizationManager.cs