Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Base / System / Windows / Markup / ContentPropertyAttribute.cs / 1 / ContentPropertyAttribute.cs
//------------------------------------------------------------------------
//
// Microsoft Windows Client Platform
// Copyright (C) Microsoft Corporation, 2005
//
// File: ContentPropertyAttribute.cs
//
// Description: Specifies which property of a class should be written as the
// direct content of the class when written to XAML.
// Spec at http://team/sites/avalon/specs/xamlspec.htm
//
// Created: 04/28/2005 [....]
//
//---------------------------------------------------------------------------
using System;
namespace System.Windows.Markup
{
///
/// An attribute that specifies which property the direct content of a XAML
/// element should be associated with.
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
public sealed class ContentPropertyAttribute : Attribute
{
///
/// Creates a new content property attriubte that indicates that associated
/// class does not have a content property attribute. This allows a descendent
/// remove an ancestors declaration of a content property attribute.
///
public ContentPropertyAttribute()
{
}
///
/// Creates a new content property attribute that associates the direct content
/// of XAML content with property of the given name
///
/// The property to associate to direct XAML content
public ContentPropertyAttribute(string name)
{
_name = name;
}
///
/// The name of the property that is associated with direct XAML content
///
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.
//------------------------------------------------------------------------
//
// Microsoft Windows Client Platform
// Copyright (C) Microsoft Corporation, 2005
//
// File: ContentPropertyAttribute.cs
//
// Description: Specifies which property of a class should be written as the
// direct content of the class when written to XAML.
// Spec at http://team/sites/avalon/specs/xamlspec.htm
//
// Created: 04/28/2005 [....]
//
//---------------------------------------------------------------------------
using System;
namespace System.Windows.Markup
{
///
/// An attribute that specifies which property the direct content of a XAML
/// element should be associated with.
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
public sealed class ContentPropertyAttribute : Attribute
{
///
/// Creates a new content property attriubte that indicates that associated
/// class does not have a content property attribute. This allows a descendent
/// remove an ancestors declaration of a content property attribute.
///
public ContentPropertyAttribute()
{
}
///
/// Creates a new content property attribute that associates the direct content
/// of XAML content with property of the given name
///
/// The property to associate to direct XAML content
public ContentPropertyAttribute(string name)
{
_name = name;
}
///
/// The name of the property that is associated with direct XAML content
///
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
- ParsedAttributeCollection.cs
- Roles.cs
- ListItemParagraph.cs
- CmsInterop.cs
- GenericPrincipal.cs
- JsonReaderDelegator.cs
- OracleSqlParser.cs
- PatternMatcher.cs
- CallbackDebugBehavior.cs
- FixUp.cs
- CodeStatement.cs
- ImportCatalogPart.cs
- WebPartZone.cs
- ProfileServiceManager.cs
- UnauthorizedWebPart.cs
- WorkflowQueuingService.cs
- ColorAnimation.cs
- GridViewSelectEventArgs.cs
- InertiaExpansionBehavior.cs
- XmlImplementation.cs
- Command.cs
- WebPageTraceListener.cs
- EventLevel.cs
- _SecureChannel.cs
- UrlMapping.cs
- QilStrConcat.cs
- DocumentPaginator.cs
- XmlSchemaInclude.cs
- MobileCategoryAttribute.cs
- XmlParserContext.cs
- LogicalExpr.cs
- ContainerSelectorBehavior.cs
- TableTextElementCollectionInternal.cs
- InvokeBase.cs
- SQLBinary.cs
- NotificationContext.cs
- ExpandCollapseProviderWrapper.cs
- SqlBuilder.cs
- HttpModulesSection.cs
- ClientBuildManager.cs
- DocumentAutomationPeer.cs
- DefaultObjectMappingItemCollection.cs
- cookiecontainer.cs
- ProfileGroupSettingsCollection.cs
- PersonalizationProviderHelper.cs
- PersistenceMetadataNamespace.cs
- VirtualDirectoryMappingCollection.cs
- CompositeControl.cs
- LiteralTextContainerControlBuilder.cs
- NetworkAddressChange.cs
- ColumnMap.cs
- DbConnectionFactory.cs
- ConstraintCollection.cs
- SoapAttributeOverrides.cs
- FixedMaxHeap.cs
- SessionPageStatePersister.cs
- XmlDocumentType.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- WebPartConnectionsCloseVerb.cs
- FamilyTypeface.cs
- PreloadedPackages.cs
- Activity.cs
- WebPartHelpVerb.cs
- DynamicValidatorEventArgs.cs
- TypeConverterMarkupExtension.cs
- UserUseLicenseDictionaryLoader.cs
- ToolStripGrip.cs
- Misc.cs
- SizeLimitedCache.cs
- CodeGenerator.cs
- SmiMetaData.cs
- TranslateTransform.cs
- TextClipboardData.cs
- DispatcherEventArgs.cs
- OAVariantLib.cs
- FixedDSBuilder.cs
- PersistChildrenAttribute.cs
- Win32SafeHandles.cs
- StylusPointProperty.cs
- PeerPresenceInfo.cs
- HttpChannelBindingToken.cs
- DelegateBodyWriter.cs
- XmlReflectionMember.cs
- GacUtil.cs
- QualificationDataItem.cs
- XmlNamespaceDeclarationsAttribute.cs
- MemberExpression.cs
- CodeSubDirectory.cs
- HttpCookiesSection.cs
- ObjectItemAssemblyLoader.cs
- LambdaCompiler.Expressions.cs
- DeclaredTypeValidatorAttribute.cs
- CodeSubDirectoriesCollection.cs
- ReadOnlyDictionary.cs
- GlyphRunDrawing.cs
- XmlSecureResolver.cs
- ClassicBorderDecorator.cs
- CollectionChangeEventArgs.cs
- XmlSchemaInfo.cs
- VersionPair.cs