Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / ThemeInfoAttribute.cs / 1 / 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
- NodeLabelEditEvent.cs
- CollectionViewProxy.cs
- Splitter.cs
- KeyFrames.cs
- SerialPinChanges.cs
- BitmapData.cs
- AutoResizedEvent.cs
- DataControlCommands.cs
- DataServices.cs
- Frame.cs
- IODescriptionAttribute.cs
- AlphaSortedEnumConverter.cs
- XamlTreeBuilder.cs
- DatePickerDateValidationErrorEventArgs.cs
- SqlMetaData.cs
- BuildManagerHost.cs
- BooleanSwitch.cs
- OrderToken.cs
- StreamUpgradeBindingElement.cs
- WindowsRegion.cs
- SafeCertificateStore.cs
- DbDataSourceEnumerator.cs
- WinFormsSecurity.cs
- CanonicalizationDriver.cs
- CompositeKey.cs
- Maps.cs
- WindowsRebar.cs
- X509DefaultServiceCertificateElement.cs
- webproxy.cs
- WebPartUserCapability.cs
- CommonXSendMessage.cs
- GeneralTransform3D.cs
- BamlBinaryReader.cs
- HttpContextBase.cs
- Hyperlink.cs
- EdmSchemaAttribute.cs
- RequestCacheEntry.cs
- ToolStripLabel.cs
- BehaviorEditorPart.cs
- ShadowGlyph.cs
- SynchronizationLockException.cs
- LineServicesRun.cs
- SoapExtensionTypeElement.cs
- LocationUpdates.cs
- CryptoStream.cs
- ClonableStack.cs
- ComboBoxAutomationPeer.cs
- ValidationHelpers.cs
- ComponentEditorPage.cs
- WsdlBuildProvider.cs
- TempFiles.cs
- BridgeDataReader.cs
- Missing.cs
- ToolStripDesignerAvailabilityAttribute.cs
- WebEncodingValidatorAttribute.cs
- SecurityTokenParametersEnumerable.cs
- RootCodeDomSerializer.cs
- InputLangChangeEvent.cs
- HttpServerVarsCollection.cs
- DBSqlParserColumn.cs
- WaitHandleCannotBeOpenedException.cs
- ProfileSettings.cs
- TraceSource.cs
- ValueCollectionParameterReader.cs
- Size3DValueSerializer.cs
- Soap12FormatExtensions.cs
- ErrorHandler.cs
- MouseEventArgs.cs
- GPStream.cs
- SystemWebCachingSectionGroup.cs
- EncoderNLS.cs
- ZoneIdentityPermission.cs
- Message.cs
- X509Certificate2Collection.cs
- ClientViaElement.cs
- NamespaceCollection.cs
- DesignerForm.cs
- NetworkInformationPermission.cs
- SHA384.cs
- ValueUtilsSmi.cs
- OleDbStruct.cs
- MetadataPropertyAttribute.cs
- DnsPermission.cs
- KeyValuePairs.cs
- CallContext.cs
- ArraySubsetEnumerator.cs
- CollectionContainer.cs
- HtmlElementEventArgs.cs
- LinqDataSourceValidationException.cs
- User.cs
- WindowsGrip.cs
- HyperLinkField.cs
- ProcessInfo.cs
- EncodingDataItem.cs
- UpdatableWrapper.cs
- SettingsPropertyWrongTypeException.cs
- PropertyGridEditorPart.cs
- ProxyWebPart.cs
- DiagnosticsConfigurationHandler.cs
- ExcCanonicalXml.cs