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
- DetailsViewUpdateEventArgs.cs
- BasicCommandTreeVisitor.cs
- BindingSourceDesigner.cs
- ProviderBase.cs
- UnauthorizedWebPart.cs
- IFlowDocumentViewer.cs
- RuleInfoComparer.cs
- ModuleBuilderData.cs
- FixedPage.cs
- _SafeNetHandles.cs
- SignedInfo.cs
- Config.cs
- RegistryPermission.cs
- NotifyIcon.cs
- ColumnCollection.cs
- DeferrableContentConverter.cs
- ReadingWritingEntityEventArgs.cs
- Encoding.cs
- FullTextState.cs
- OrderedParallelQuery.cs
- EtwTrackingBehavior.cs
- WrappedReader.cs
- BitmapEffectRenderDataResource.cs
- Debugger.cs
- RightsManagementEncryptionTransform.cs
- DataServiceExpressionVisitor.cs
- AuthorizationContext.cs
- PngBitmapDecoder.cs
- XmlComment.cs
- EncodingNLS.cs
- Group.cs
- ReflectPropertyDescriptor.cs
- Win32Exception.cs
- PenCursorManager.cs
- EncryptedReference.cs
- EventMappingSettingsCollection.cs
- SecuritySessionSecurityTokenProvider.cs
- PassportAuthenticationModule.cs
- Screen.cs
- SynchronizationContextHelper.cs
- XsdBuildProvider.cs
- IODescriptionAttribute.cs
- RepeaterDesigner.cs
- ToolTip.cs
- RadioButton.cs
- SortDescriptionCollection.cs
- ObjectKeyFrameCollection.cs
- SslStream.cs
- InspectionWorker.cs
- DocumentPageView.cs
- RectangleF.cs
- EventLogPermissionEntryCollection.cs
- CSharpCodeProvider.cs
- FileEnumerator.cs
- ClrProviderManifest.cs
- CodeGenerationManager.cs
- DataGridTableCollection.cs
- UnhandledExceptionEventArgs.cs
- GridSplitterAutomationPeer.cs
- TraceSection.cs
- BrowserCapabilitiesFactoryBase.cs
- UnmanagedMemoryStreamWrapper.cs
- OdbcEnvironmentHandle.cs
- Utils.cs
- Mapping.cs
- SafeHandle.cs
- BoundField.cs
- EncoderParameter.cs
- MouseEventArgs.cs
- Int64Converter.cs
- MSG.cs
- CharacterBuffer.cs
- TableCell.cs
- SectionInformation.cs
- ProcessModule.cs
- DataGridColumnsPage.cs
- XmlEventCache.cs
- UIElementHelper.cs
- UserControlParser.cs
- WebPartDisplayModeCancelEventArgs.cs
- followingsibling.cs
- AuthenticateEventArgs.cs
- TemplateContainer.cs
- ChineseLunisolarCalendar.cs
- ObjectDataSourceView.cs
- NetPeerTcpBindingElement.cs
- ManagementPath.cs
- CompositeScriptReferenceEventArgs.cs
- XmlArrayAttribute.cs
- ConfigurationStrings.cs
- SingleSelectRootGridEntry.cs
- FontFamilyConverter.cs
- CookielessData.cs
- CustomWebEventKey.cs
- WaitHandleCannotBeOpenedException.cs
- ConstraintEnumerator.cs
- OdbcConnectionStringbuilder.cs
- sqlinternaltransaction.cs
- DropAnimation.xaml.cs
- MediaTimeline.cs