Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / ThemeInfoAttribute.cs / 1305600 / ThemeInfoAttribute.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Reflection; namespace System.Windows { ////// Specifies where theme dictionaries are stored for types in an assembly. /// [AttributeUsage(AttributeTargets.Assembly)] public sealed class ThemeInfoAttribute : Attribute { ////// Creates an attribute that defines theme dictionary locations for types in an assembly. /// /// The location of theme specific resources. /// The location of generic, not theme specific, resources. public ThemeInfoAttribute(ResourceDictionaryLocation themeDictionaryLocation, ResourceDictionaryLocation genericDictionaryLocation) { _themeDictionaryLocation = themeDictionaryLocation; _genericDictionaryLocation = genericDictionaryLocation; } ////// The location of theme specific resources. /// public ResourceDictionaryLocation ThemeDictionaryLocation { get { return _themeDictionaryLocation; } } ////// The location of generic, not theme specific, resources. /// public ResourceDictionaryLocation GenericDictionaryLocation { get { return _genericDictionaryLocation; } } internal static ThemeInfoAttribute FromAssembly(Assembly assembly) { return Attribute.GetCustomAttribute(assembly, typeof(ThemeInfoAttribute)) as ThemeInfoAttribute; } private ResourceDictionaryLocation _themeDictionaryLocation; private ResourceDictionaryLocation _genericDictionaryLocation; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Reflection; namespace System.Windows { ////// Specifies where theme dictionaries are stored for types in an assembly. /// [AttributeUsage(AttributeTargets.Assembly)] public sealed class ThemeInfoAttribute : Attribute { ////// Creates an attribute that defines theme dictionary locations for types in an assembly. /// /// The location of theme specific resources. /// The location of generic, not theme specific, resources. public ThemeInfoAttribute(ResourceDictionaryLocation themeDictionaryLocation, ResourceDictionaryLocation genericDictionaryLocation) { _themeDictionaryLocation = themeDictionaryLocation; _genericDictionaryLocation = genericDictionaryLocation; } ////// The location of theme specific resources. /// public ResourceDictionaryLocation ThemeDictionaryLocation { get { return _themeDictionaryLocation; } } ////// The location of generic, not theme specific, resources. /// public ResourceDictionaryLocation GenericDictionaryLocation { get { return _genericDictionaryLocation; } } internal static ThemeInfoAttribute FromAssembly(Assembly assembly) { return Attribute.GetCustomAttribute(assembly, typeof(ThemeInfoAttribute)) as ThemeInfoAttribute; } private ResourceDictionaryLocation _themeDictionaryLocation; private ResourceDictionaryLocation _genericDictionaryLocation; } } // 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
- ProcessHost.cs
- SignedXml.cs
- PrintDialogException.cs
- SharedPerformanceCounter.cs
- XMLDiffLoader.cs
- WindowHideOrCloseTracker.cs
- SQLDecimalStorage.cs
- WaitHandle.cs
- MetadataPropertyCollection.cs
- TextElementCollection.cs
- ContentOnlyMessage.cs
- ContentPlaceHolder.cs
- Rect3DConverter.cs
- DataSourceControl.cs
- OleDragDropHandler.cs
- TreeViewTemplateSelector.cs
- Interlocked.cs
- BufferedWebEventProvider.cs
- XamlTemplateSerializer.cs
- BufferModesCollection.cs
- LayoutExceptionEventArgs.cs
- WebPartPersonalization.cs
- Knowncolors.cs
- VectorCollectionConverter.cs
- ApplicationTrust.cs
- ClientProxyGenerator.cs
- DesignTimeParseData.cs
- XmlSchemaImporter.cs
- TextHidden.cs
- Rectangle.cs
- MappingModelBuildProvider.cs
- ObjectSelectorEditor.cs
- PanelContainerDesigner.cs
- ItemPager.cs
- ViewStateException.cs
- TrackBarRenderer.cs
- XmlAutoDetectWriter.cs
- PriorityRange.cs
- TypeDependencyAttribute.cs
- KerberosSecurityTokenParameters.cs
- XmlILTrace.cs
- GlobalItem.cs
- SQLGuid.cs
- DataGridLinkButton.cs
- BindingListCollectionView.cs
- CodeEntryPointMethod.cs
- ChooseAction.cs
- Normalization.cs
- DbReferenceCollection.cs
- SystemIcmpV6Statistics.cs
- SqlDataSourceStatusEventArgs.cs
- XsltCompileContext.cs
- DbDataRecord.cs
- RefreshInfo.cs
- WebPartAuthorizationEventArgs.cs
- ChtmlMobileTextWriter.cs
- OpenTypeCommon.cs
- TemplateAction.cs
- AttributeUsageAttribute.cs
- UnionExpr.cs
- Single.cs
- NamedPipeProcessProtocolHandler.cs
- XmlSchemaImporter.cs
- BaseCodePageEncoding.cs
- WebBrowserEvent.cs
- ToolStripOverflowButton.cs
- ColumnTypeConverter.cs
- TileModeValidation.cs
- TableProviderWrapper.cs
- PrivilegeNotHeldException.cs
- ChannelServices.cs
- VectorAnimationBase.cs
- PackageRelationshipSelector.cs
- MatchingStyle.cs
- DayRenderEvent.cs
- ColorAnimationBase.cs
- Style.cs
- AutomationElementCollection.cs
- FileDetails.cs
- _ConnectOverlappedAsyncResult.cs
- ControlDesigner.cs
- CollectionContainer.cs
- IntranetCredentialPolicy.cs
- WebExceptionStatus.cs
- DivideByZeroException.cs
- _IPv4Address.cs
- GatewayDefinition.cs
- PropertyBuilder.cs
- SqlConnectionPoolProviderInfo.cs
- SectionRecord.cs
- EventProvider.cs
- PolygonHotSpot.cs
- Accessible.cs
- DataColumnMappingCollection.cs
- ECDiffieHellmanCng.cs
- InternalPermissions.cs
- DbgUtil.cs
- HttpListenerPrefixCollection.cs
- WindowsBrush.cs
- DesignerCategoryAttribute.cs