Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Base / System / Windows / Markup / XmlnsPrefixAttribute.cs / 1 / XmlnsPrefixAttribute.cs
//------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation, 2005 // // File: XmlnsPrefixAttribute.cs // // Contents: Namespace default prefix recommendation support // Created: 04/28/2005 chuckj // //----------------------------------------------------------------------- using System; using System.ComponentModel; namespace System.Windows.Markup { ////// /// This attribute allows an assembly to recommend a prefix to be used when writing elements and /// attributes in a xaml file. /// /// For a WinFX assembly, it can set the attributes as follows: /// /// [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] public sealed class XmlnsPrefixAttribute: Attribute { ////// [assembly:XmlnsDefinition("http://schemas.fabrikam.com/mynamespace", "fabrikam.myproduct.mycategory1")] /// [assembly:XmlnsDefinition("http://schemas.fabrikam.com/mynamespace", "fabrikam.myproduct.mycategory2")] /// [assembly:XmlnsPrefix("http://schemas.fabrikam.com/mynamespace", "myns")] ///
/// /// If fabrikam.myproduct.mycategory namespace in this assembly contains a UIElement such as "MyButton", the /// xaml file could use it like below: ////// <Page xmlns:myns="http://schemas.fabrikam.com/mynamespace" .... > /// <myns:MyButton> ..... </myns:MyButton> /// </Page> ///
////// Constructor /// /// XML namespce /// recommended prefix public XmlnsPrefixAttribute(string xmlNamespace, string prefix) { // Validate Input Arguments if (xmlNamespace == null) { throw new ArgumentNullException("xmlNamespace"); } if (prefix == null) { throw new ArgumentNullException("prefix"); } _xmlNamespace = xmlNamespace; _prefix= prefix; } #region public properties ////// XML Namespace /// public string XmlNamespace { get { return _xmlNamespace; } } ////// New Xml Namespace /// public string Prefix { get { return _prefix; } } #endregion public properties #region Private Fields private string _xmlNamespace; private string _prefix; #endregion Private Fields } } // 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
- COM2PropertyBuilderUITypeEditor.cs
- OpenTypeLayout.cs
- ParseHttpDate.cs
- BorderGapMaskConverter.cs
- TextRangeProviderWrapper.cs
- ContextStack.cs
- ScrollPattern.cs
- ObjectParameter.cs
- AnimatedTypeHelpers.cs
- JavaScriptSerializer.cs
- FtpRequestCacheValidator.cs
- PageThemeCodeDomTreeGenerator.cs
- TemplatePropertyEntry.cs
- ModulesEntry.cs
- PluralizationServiceUtil.cs
- BindingList.cs
- WebPartConnectionsCancelVerb.cs
- XmlRawWriterWrapper.cs
- DesignObjectWrapper.cs
- SourceChangedEventArgs.cs
- SecureStringHasher.cs
- CryptoApi.cs
- DynamicFilter.cs
- PropertyEmitter.cs
- TextServicesManager.cs
- ServiceAppDomainAssociationProvider.cs
- SrgsElement.cs
- IsolatedStoragePermission.cs
- TextEncodedRawTextWriter.cs
- HtmlEmptyTagControlBuilder.cs
- DoWorkEventArgs.cs
- invalidudtexception.cs
- BindingSource.cs
- VersionPair.cs
- DateTimeFormat.cs
- ControlUtil.cs
- LoadItemsEventArgs.cs
- DataGridViewColumnEventArgs.cs
- MatrixTransform.cs
- _LocalDataStore.cs
- TypeUtils.cs
- XmlSchemaComplexContentRestriction.cs
- DataGridViewSelectedRowCollection.cs
- EndpointDiscoveryMetadata.cs
- SerializableReadOnlyDictionary.cs
- SAPICategories.cs
- Socket.cs
- XmlLoader.cs
- Graph.cs
- HostProtectionPermission.cs
- TextFormatterImp.cs
- PriorityQueue.cs
- QilFactory.cs
- WindowsGraphicsCacheManager.cs
- GridLength.cs
- ImpersonationOption.cs
- OutputCacheSettingsSection.cs
- ObjectCacheHost.cs
- WebColorConverter.cs
- DataServiceConfiguration.cs
- DataPointer.cs
- SchemaEntity.cs
- ParallelTimeline.cs
- ScrollContentPresenter.cs
- securitycriticaldataClass.cs
- VisualTarget.cs
- FrameSecurityDescriptor.cs
- DoubleAnimationClockResource.cs
- CapabilitiesUse.cs
- CryptoKeySecurity.cs
- SystemIPGlobalStatistics.cs
- ModelFactory.cs
- StorageEndPropertyMapping.cs
- InnerItemCollectionView.cs
- RegionInfo.cs
- EntityParameterCollection.cs
- DataServiceResponse.cs
- StyleModeStack.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- RelationshipConverter.cs
- _BufferOffsetSize.cs
- KnownBoxes.cs
- HtmlInputCheckBox.cs
- StaticSiteMapProvider.cs
- CatalogZone.cs
- AnnotationResourceCollection.cs
- ReferenceSchema.cs
- ProxyAttribute.cs
- ButtonFlatAdapter.cs
- ViewStateModeByIdAttribute.cs
- SelectionChangedEventArgs.cs
- NativeMethods.cs
- EntityDataSourceContainerNameConverter.cs
- WebProxyScriptElement.cs
- Odbc32.cs
- PostBackTrigger.cs
- Util.cs
- ObjRef.cs
- SplineKeyFrames.cs
- NamedPipeTransportSecurity.cs