Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Base / System / Windows / Markup / DependsOnAttribute.cs / 1 / DependsOnAttribute.cs
//------------------------------------------------------------------------
//
// Microsoft Windows Client Platform
// Copyright (C) Microsoft Corporation, 2005
//
// File: DependsOnAttribute.cs
//
// Contents: An attribute that allows declaring that one property
// depends on the value of another property. The serialization
// system will ensure that the listed property is serialized
// prior to the property that this attribute is set on.
// Care must be taken to avoid circular dependencies. They
// are only detected when writing all the properties in the
// cycle.
//
// Created: 04/28/2005 chuckj
//
//-----------------------------------------------------------------------
using System;
namespace System.Windows.Markup
{
///
/// DependsOnAttribute allows declaring that one property
/// depends on the value of another property. The serialization
/// system will ensure that the listed property is serialized
/// prior to the property that this attribute is set on.
/// Care must be taken to avoid circular dependencies. They
/// are only detected when writing all the properties in the
/// cycle.
///
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Method, AllowMultiple=true)]
public sealed class DependsOnAttribute: Attribute
{
///
/// Constructor for DependsOnAttribute
///
/// The name of the property that the property depends on
public DependsOnAttribute(string name)
{
_name = name;
}
///
/// Override of Attribute.TypeId
///
public override object TypeId
{
// this allows multiple DependsOn attributes to show up in the
// PropertyDescriptor.Attributes collection. (bug 1611449)
get { return this; }
}
///
/// The name of the property that is declared to depend on
///
public string Name
{
get { return _name; }
}
private string _name;
}
}
// 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
- InvalidBodyAccessException.cs
- BindingExpressionBase.cs
- DoubleAnimationUsingKeyFrames.cs
- WorkflowServiceNamespace.cs
- FileBasedResourceGroveler.cs
- ControlValuePropertyAttribute.cs
- DataGridPagerStyle.cs
- TreeViewHitTestInfo.cs
- FixedTextSelectionProcessor.cs
- ButtonFieldBase.cs
- IISUnsafeMethods.cs
- MarkupExtensionReturnTypeAttribute.cs
- BufferBuilder.cs
- DLinqColumnProvider.cs
- UriScheme.cs
- BoundPropertyEntry.cs
- FontDialog.cs
- ValueProviderWrapper.cs
- CodePropertyReferenceExpression.cs
- VisualStyleElement.cs
- Baml6ConstructorInfo.cs
- WebPartDisplayModeCollection.cs
- SiteIdentityPermission.cs
- ImmutableAssemblyCacheEntry.cs
- CommandHelpers.cs
- DiagnosticsConfiguration.cs
- ValidationEventArgs.cs
- WindowsUpDown.cs
- WebPartConnectVerb.cs
- SerializationAttributes.cs
- GridProviderWrapper.cs
- DocumentCollection.cs
- MetadataElement.cs
- FolderBrowserDialog.cs
- CharacterMetricsDictionary.cs
- XmlEncoding.cs
- PersonalizableTypeEntry.cs
- MD5CryptoServiceProvider.cs
- IdnMapping.cs
- DataGridItem.cs
- DataServiceConfiguration.cs
- WindowsIPAddress.cs
- LayoutEditorPart.cs
- CqlParser.cs
- UnaryNode.cs
- EdmItemCollection.cs
- ResourceDefaultValueAttribute.cs
- GeometryCombineModeValidation.cs
- BmpBitmapEncoder.cs
- CollectionBuilder.cs
- ConstraintConverter.cs
- Helper.cs
- MemberListBinding.cs
- LogicalExpr.cs
- FormDesigner.cs
- WindowShowOrOpenTracker.cs
- BlobPersonalizationState.cs
- DecimalConverter.cs
- InstanceLockQueryResult.cs
- DesignerLabelAdapter.cs
- StylusEditingBehavior.cs
- PartManifestEntry.cs
- StylusButton.cs
- UnsafePeerToPeerMethods.cs
- _RequestLifetimeSetter.cs
- ConfigurationManagerInternalFactory.cs
- StrongNameUtility.cs
- NotifyIcon.cs
- DataReceivedEventArgs.cs
- EmptyCollection.cs
- Util.cs
- AuthenticationSection.cs
- Style.cs
- _AutoWebProxyScriptWrapper.cs
- _ListenerRequestStream.cs
- CngKey.cs
- SparseMemoryStream.cs
- TextAdaptor.cs
- AssociationProvider.cs
- PrintDialog.cs
- ItemCheckEvent.cs
- QuestionEventArgs.cs
- WindowPattern.cs
- UntrustedRecipientException.cs
- GeneralTransform.cs
- XhtmlTextWriter.cs
- QueryableDataSource.cs
- If.cs
- Symbol.cs
- Canvas.cs
- XmlChildEnumerator.cs
- HtmlImage.cs
- StylusPointPropertyInfo.cs
- FontConverter.cs
- DataGridViewRowsRemovedEventArgs.cs
- StateItem.cs
- streamingZipPartStream.cs
- SchemaElementLookUpTableEnumerator.cs
- Oid.cs
- InputMethod.cs