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
- QueryCoreOp.cs
- WinCategoryAttribute.cs
- SqlInternalConnection.cs
- DetailsViewCommandEventArgs.cs
- CircleHotSpot.cs
- TreeViewEvent.cs
- LocalValueEnumerator.cs
- IsolatedStorageFile.cs
- CollectionEditor.cs
- StaticDataManager.cs
- ParseChildrenAsPropertiesAttribute.cs
- LogEntrySerializer.cs
- ellipse.cs
- PartDesigner.cs
- ProfessionalColors.cs
- arc.cs
- XPathCompileException.cs
- SinglePageViewer.cs
- Currency.cs
- ArraySegment.cs
- AnimationLayer.cs
- xml.cs
- DefaultSection.cs
- TextRangeEditTables.cs
- PagesSection.cs
- StateChangeEvent.cs
- KeyEventArgs.cs
- TimeSpan.cs
- Delegate.cs
- DocumentPageView.cs
- TextProperties.cs
- TextChange.cs
- GatewayIPAddressInformationCollection.cs
- DataGridViewCellStyleConverter.cs
- EventMappingSettingsCollection.cs
- AnimationException.cs
- UpdateExpressionVisitor.cs
- NameTable.cs
- PersonalizableTypeEntry.cs
- HttpHandlerActionCollection.cs
- MethodSet.cs
- XmlNodeChangedEventArgs.cs
- LogPolicy.cs
- ThreadAbortException.cs
- WorkerProcess.cs
- RequestCacheValidator.cs
- Part.cs
- SQLBinaryStorage.cs
- CompilerCollection.cs
- ConnectionStringSettingsCollection.cs
- NameSpaceExtractor.cs
- COM2IDispatchConverter.cs
- HostingPreferredMapPath.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- InteropDesigner.xaml.cs
- HtmlSelect.cs
- Char.cs
- ResourcePermissionBaseEntry.cs
- ChangeInterceptorAttribute.cs
- ThreadLocal.cs
- ComponentResourceManager.cs
- AmbientValueAttribute.cs
- DynamicEndpoint.cs
- SignatureResourcePool.cs
- AxDesigner.cs
- WebServiceClientProxyGenerator.cs
- VariableAction.cs
- ObjectQueryProvider.cs
- DrawingCollection.cs
- LayoutTableCell.cs
- EnlistmentState.cs
- MgmtResManager.cs
- MenuItemCollection.cs
- __ComObject.cs
- ConfigurationErrorsException.cs
- safex509handles.cs
- EventArgs.cs
- CachingHintValidation.cs
- IItemProperties.cs
- ReflectionTypeLoadException.cs
- Pair.cs
- OutputCacheSettingsSection.cs
- DragDeltaEventArgs.cs
- ScriptBehaviorDescriptor.cs
- ValueSerializer.cs
- DataReaderContainer.cs
- RoutedEventArgs.cs
- NameValueFileSectionHandler.cs
- OdbcErrorCollection.cs
- CookieParameter.cs
- isolationinterop.cs
- DataGridViewDataErrorEventArgs.cs
- EventLogPermissionAttribute.cs
- MSAANativeProvider.cs
- MarshalByValueComponent.cs
- BitStack.cs
- MulticastNotSupportedException.cs
- TextBoxView.cs
- ObjectContext.cs
- DefaultBinder.cs