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
- HostElement.cs
- EncodingInfo.cs
- TextBounds.cs
- ScalarOps.cs
- OuterGlowBitmapEffect.cs
- Tablet.cs
- SymbolEqualComparer.cs
- Pointer.cs
- SQLUtility.cs
- InternalCache.cs
- Visual3D.cs
- DocumentViewerBaseAutomationPeer.cs
- DropDownButton.cs
- DocumentSchemaValidator.cs
- FtpWebResponse.cs
- PerformanceCounterPermission.cs
- TimerElapsedEvenArgs.cs
- IntAverageAggregationOperator.cs
- UpdatePanelTriggerCollection.cs
- EntityCommandDefinition.cs
- TextContainer.cs
- CorrelationTokenTypeConvertor.cs
- SchemaImporterExtension.cs
- ScriptServiceAttribute.cs
- InlineCollection.cs
- OptimalBreakSession.cs
- X509AudioLogo.cs
- ModifierKeysValueSerializer.cs
- EllipticalNodeOperations.cs
- Descriptor.cs
- ImageField.cs
- DataGridSortCommandEventArgs.cs
- XmlQualifiedName.cs
- TypeUtil.cs
- PromptBuilder.cs
- ValuePattern.cs
- ActivationServices.cs
- SecurityException.cs
- Viewport3DVisual.cs
- XPathEmptyIterator.cs
- ReachSerializationCacheItems.cs
- InteropBitmapSource.cs
- entityreference_tresulttype.cs
- WindowsScroll.cs
- ExpressionBinding.cs
- StagingAreaInputItem.cs
- SvcMapFileLoader.cs
- UntypedNullExpression.cs
- TimeoutConverter.cs
- ContentFilePart.cs
- WebReferencesBuildProvider.cs
- _AutoWebProxyScriptEngine.cs
- WebHostScriptMappingsInstallComponent.cs
- WeakReference.cs
- _BufferOffsetSize.cs
- FontDialog.cs
- SmtpReplyReader.cs
- IdentityNotMappedException.cs
- XmlWellformedWriter.cs
- NoClickablePointException.cs
- VersionPair.cs
- DBParameter.cs
- TypedAsyncResult.cs
- KeyboardEventArgs.cs
- CrossAppDomainChannel.cs
- DocumentGrid.cs
- EventItfInfo.cs
- InstanceDataCollectionCollection.cs
- AutomationElement.cs
- XsltFunctions.cs
- DocumentAutomationPeer.cs
- BufferedStream.cs
- ForAllOperator.cs
- Span.cs
- SQLConvert.cs
- ComPlusServiceHost.cs
- CustomAttributeSerializer.cs
- RootDesignerSerializerAttribute.cs
- SoapFault.cs
- KeyConverter.cs
- ByteStreamGeometryContext.cs
- ellipse.cs
- ComponentCodeDomSerializer.cs
- BaseResourcesBuildProvider.cs
- SizeAnimationClockResource.cs
- validation.cs
- DataMemberListEditor.cs
- StorageEndPropertyMapping.cs
- EdmComplexPropertyAttribute.cs
- AccessDataSourceWizardForm.cs
- LinqDataSourceDisposeEventArgs.cs
- AffineTransform3D.cs
- WindowHelperService.cs
- TreeNodeEventArgs.cs
- SendReply.cs
- CompilerHelpers.cs
- CopyNodeSetAction.cs
- TdsValueSetter.cs
- BooleanFunctions.cs
- RotateTransform.cs