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
- InternalCache.cs
- OracleDateTime.cs
- DataMemberFieldConverter.cs
- AddressHeaderCollectionElement.cs
- EastAsianLunisolarCalendar.cs
- ActivityPropertyReference.cs
- PropertyMap.cs
- FixedTextSelectionProcessor.cs
- SoapInteropTypes.cs
- ResolveMatchesMessage11.cs
- ObjectKeyFrameCollection.cs
- SimpleTextLine.cs
- MenuItemBinding.cs
- ILGenerator.cs
- EventArgs.cs
- ModelPropertyImpl.cs
- ListViewDeletedEventArgs.cs
- Brush.cs
- DataServiceStreamProviderWrapper.cs
- HttpRequestTraceRecord.cs
- LayoutEditorPart.cs
- OutputCacheSettingsSection.cs
- EntityTemplateFactory.cs
- EqualityArray.cs
- pingexception.cs
- UserControlAutomationPeer.cs
- DecoratedNameAttribute.cs
- ReflectionTypeLoadException.cs
- SpellCheck.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- PrincipalPermission.cs
- WebControlsSection.cs
- SystemDiagnosticsSection.cs
- TraversalRequest.cs
- ActivityDesignerHighlighter.cs
- SponsorHelper.cs
- DataComponentGenerator.cs
- WrappedIUnknown.cs
- MethodBuilder.cs
- ListControlBoundActionList.cs
- Pen.cs
- CriticalHandle.cs
- RefType.cs
- SafeArrayRankMismatchException.cs
- SpecularMaterial.cs
- ResourceWriter.cs
- Blend.cs
- CodeFieldReferenceExpression.cs
- VoiceInfo.cs
- TransactionWaitAsyncResult.cs
- AdPostCacheSubstitution.cs
- Nodes.cs
- BoundingRectTracker.cs
- CharUnicodeInfo.cs
- XmlWriterDelegator.cs
- DesigntimeLicenseContextSerializer.cs
- PassportAuthenticationEventArgs.cs
- TagElement.cs
- SurrogateDataContract.cs
- RectKeyFrameCollection.cs
- SchemaMapping.cs
- CacheMemory.cs
- Collection.cs
- NumericUpDownAcceleration.cs
- EmptyControlCollection.cs
- InfoCardRSACryptoProvider.cs
- HMAC.cs
- TimelineClockCollection.cs
- Line.cs
- CompositeActivityTypeDescriptor.cs
- CatalogZoneBase.cs
- __TransparentProxy.cs
- Hashtable.cs
- XmlSchemaComplexContentRestriction.cs
- TraceContextEventArgs.cs
- XmlSchemaSimpleContentExtension.cs
- DbParameterCollectionHelper.cs
- CompositeTypefaceMetrics.cs
- SystemParameters.cs
- KnownTypes.cs
- infer.cs
- ShellProvider.cs
- UntrustedRecipientException.cs
- OdbcConnection.cs
- ExceptionValidationRule.cs
- CounterCreationData.cs
- ListenerElementsCollection.cs
- QueryCorrelationInitializer.cs
- StructuredTypeEmitter.cs
- DbInsertCommandTree.cs
- AssemblyCollection.cs
- GradientStop.cs
- TextParagraphProperties.cs
- AsmxEndpointPickerExtension.cs
- CompoundFileStorageReference.cs
- XmlNamespaceManager.cs
- wmiutil.cs
- TextRangeEditTables.cs
- DbCommandDefinition.cs
- XmlSchemaInclude.cs