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
- HTTP_SERVICE_CONFIG_URLACL_KEY.cs
- ContentOnlyMessage.cs
- BindingNavigator.cs
- RuntimeVariableList.cs
- ChannelAcceptor.cs
- HwndSourceParameters.cs
- FileSystemWatcher.cs
- IdentitySection.cs
- ScriptingSectionGroup.cs
- ValidateNames.cs
- DataBoundControlHelper.cs
- DecimalAnimationUsingKeyFrames.cs
- RpcCryptoRequest.cs
- SequenceQuery.cs
- AppSettingsExpressionBuilder.cs
- _HeaderInfoTable.cs
- CodeDirectoryCompiler.cs
- elementinformation.cs
- AnimationStorage.cs
- DataTable.cs
- SafeIUnknown.cs
- StorageModelBuildProvider.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- MouseEvent.cs
- WorkflowRuntimeElement.cs
- CodeChecksumPragma.cs
- QuaternionRotation3D.cs
- ExitEventArgs.cs
- FontFaceLayoutInfo.cs
- DeviceContext2.cs
- TransformerInfo.cs
- AssemblyCache.cs
- BitmapCacheBrush.cs
- EntityDataSourceDesigner.cs
- TextFindEngine.cs
- CollectionChangeEventArgs.cs
- UIntPtr.cs
- UnSafeCharBuffer.cs
- BufferedWebEventProvider.cs
- ContainerSelectorActiveEvent.cs
- ActivityXRefConverter.cs
- UiaCoreProviderApi.cs
- EmissiveMaterial.cs
- PackWebResponse.cs
- DbParameterCollection.cs
- WCFBuildProvider.cs
- Int32Collection.cs
- DetailsView.cs
- ParsedAttributeCollection.cs
- MsmqNonTransactedPoisonHandler.cs
- TextViewBase.cs
- ControlCommandSet.cs
- RichTextBoxContextMenu.cs
- NameValueCache.cs
- GridViewColumnHeader.cs
- DelegateSerializationHolder.cs
- CompModSwitches.cs
- CacheVirtualItemsEvent.cs
- Expr.cs
- XmlImplementation.cs
- ProcessManager.cs
- StickyNote.cs
- EntityDataSourceMemberPath.cs
- XmlCharacterData.cs
- AutomationElementCollection.cs
- Enum.cs
- WsdlHelpGeneratorElement.cs
- DataGridViewCellStyleChangedEventArgs.cs
- BaseCollection.cs
- SqlCacheDependencyDatabase.cs
- iisPickupDirectory.cs
- CompilerScope.Storage.cs
- FusionWrap.cs
- ListDictionaryInternal.cs
- WorkflowLayouts.cs
- TraceContextRecord.cs
- ListDictionaryInternal.cs
- SafeFindHandle.cs
- PageWrapper.cs
- CreateUserErrorEventArgs.cs
- TextureBrush.cs
- AsyncPostBackErrorEventArgs.cs
- Events.cs
- HtmlInputFile.cs
- ObjectPersistData.cs
- Point4DValueSerializer.cs
- EpmSourceTree.cs
- DataGridViewRowStateChangedEventArgs.cs
- RadioButtonStandardAdapter.cs
- Control.cs
- WebPartEditVerb.cs
- XsdDuration.cs
- TreeViewItem.cs
- _ShellExpression.cs
- TransactionScope.cs
- _SafeNetHandles.cs
- InputMethodStateChangeEventArgs.cs
- ValuePatternIdentifiers.cs
- ObjectToIdCache.cs
- ValueTypeFixupInfo.cs