Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / System / Windows / SystemThemeKey.cs / 1 / SystemThemeKey.cs
//---------------------------------------------------------------------------- // // Copyright (C) 2004 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Reflection; using System.Text; using System.Windows; using System.Windows.Markup; using System.ComponentModel; using System.Diagnostics; namespace System.Windows { ////// Implements ResourceKey to create unique keys for our system resources. /// Keys will be exposed publicly only with the ResourceKey API. /// [TypeConverter(typeof(System.Windows.Markup.SystemKeyConverter))] internal class SystemThemeKey : ResourceKey { ////// Constructs a new instance of the key with the given ID. /// /// The internal, unique ID of the system resource. internal SystemThemeKey(SystemResourceKeyID id) { _id = id; Debug.Assert(id > SystemResourceKeyID.InternalSystemThemeStylesStart && id < SystemResourceKeyID.InternalSystemThemeStylesEnd); } ////// Used to determine where to look for the resource dictionary that holds this resource. /// public override Assembly Assembly { get { if (_presentationFrameworkAssembly == null) { _presentationFrameworkAssembly = typeof(FrameworkElement).Assembly; } return _presentationFrameworkAssembly; } } ////// Determines if the passed in object is equal to this object. /// Two keys will be equal if they both have the same ID. /// /// The object to compare with. ///True if the objects are equal. False otherwise. public override bool Equals(object o) { SystemThemeKey key = o as SystemThemeKey; if (key != null) { return key._id == this._id; } return false; } ////// Serves as a hash function for a particular type. /// public override int GetHashCode() { return (int)_id; } ////// get string representation of this key /// ///the string representation of the key public override string ToString() { return _id.ToString(); } internal SystemResourceKeyID InternalKey { get { return _id; } } private SystemResourceKeyID _id; private static Assembly _presentationFrameworkAssembly; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // Copyright (C) 2004 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Reflection; using System.Text; using System.Windows; using System.Windows.Markup; using System.ComponentModel; using System.Diagnostics; namespace System.Windows { ////// Implements ResourceKey to create unique keys for our system resources. /// Keys will be exposed publicly only with the ResourceKey API. /// [TypeConverter(typeof(System.Windows.Markup.SystemKeyConverter))] internal class SystemThemeKey : ResourceKey { ////// Constructs a new instance of the key with the given ID. /// /// The internal, unique ID of the system resource. internal SystemThemeKey(SystemResourceKeyID id) { _id = id; Debug.Assert(id > SystemResourceKeyID.InternalSystemThemeStylesStart && id < SystemResourceKeyID.InternalSystemThemeStylesEnd); } ////// Used to determine where to look for the resource dictionary that holds this resource. /// public override Assembly Assembly { get { if (_presentationFrameworkAssembly == null) { _presentationFrameworkAssembly = typeof(FrameworkElement).Assembly; } return _presentationFrameworkAssembly; } } ////// Determines if the passed in object is equal to this object. /// Two keys will be equal if they both have the same ID. /// /// The object to compare with. ///True if the objects are equal. False otherwise. public override bool Equals(object o) { SystemThemeKey key = o as SystemThemeKey; if (key != null) { return key._id == this._id; } return false; } ////// Serves as a hash function for a particular type. /// public override int GetHashCode() { return (int)_id; } ////// get string representation of this key /// ///the string representation of the key public override string ToString() { return _id.ToString(); } internal SystemResourceKeyID InternalKey { get { return _id; } } private SystemResourceKeyID _id; private static Assembly _presentationFrameworkAssembly; } } // 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
- DataGridViewSelectedColumnCollection.cs
- WebPartMenuStyle.cs
- OutputCache.cs
- regiisutil.cs
- DataServiceRequest.cs
- updateconfighost.cs
- TrackingProfileManager.cs
- CodeDOMUtility.cs
- DefaultCommandConverter.cs
- Validator.cs
- Util.cs
- ExpandCollapsePattern.cs
- HtmlContainerControl.cs
- BitmapFrame.cs
- While.cs
- ToolStrip.cs
- VarInfo.cs
- AesCryptoServiceProvider.cs
- DataBoundControlActionList.cs
- InternalConfigRoot.cs
- DataTableClearEvent.cs
- WebBrowserDocumentCompletedEventHandler.cs
- CodeGotoStatement.cs
- DesignerActionMethodItem.cs
- FlatButtonAppearance.cs
- __Error.cs
- ContainerFilterService.cs
- Error.cs
- AssertSection.cs
- LinkTarget.cs
- WebPartCollection.cs
- HttpCacheVaryByContentEncodings.cs
- GridEntryCollection.cs
- TextEffect.cs
- BitmapEffectGeneralTransform.cs
- ScrollItemPattern.cs
- CompressEmulationStream.cs
- SQLInt64.cs
- SessionPageStateSection.cs
- BaseTemplateCodeDomTreeGenerator.cs
- SafeSerializationManager.cs
- FileSecurity.cs
- ChangeNode.cs
- SafeRightsManagementSessionHandle.cs
- Crypto.cs
- Light.cs
- TypeGeneratedEventArgs.cs
- BamlRecords.cs
- SHA256.cs
- ResizingMessageFilter.cs
- Condition.cs
- Point3D.cs
- BamlVersionHeader.cs
- GridViewColumnCollection.cs
- assemblycache.cs
- VectorCollection.cs
- TraceProvider.cs
- EmptyQuery.cs
- PageRequestManager.cs
- BehaviorEditorPart.cs
- ToolStripControlHost.cs
- CommandCollectionEditor.cs
- IriParsingElement.cs
- XPathItem.cs
- MimeBasePart.cs
- DataView.cs
- WindowsFormsHostPropertyMap.cs
- ByteStorage.cs
- HtmlAnchor.cs
- ToolZone.cs
- ProcessProtocolHandler.cs
- NameSpaceEvent.cs
- OrderedDictionaryStateHelper.cs
- ConfigurationStrings.cs
- SkinBuilder.cs
- TransformerConfigurationWizardBase.cs
- WebBrowsableAttribute.cs
- XmlSchemaDocumentation.cs
- JapaneseLunisolarCalendar.cs
- TextRenderer.cs
- Wizard.cs
- SystemException.cs
- OdbcStatementHandle.cs
- IndependentlyAnimatedPropertyMetadata.cs
- FormsAuthenticationUserCollection.cs
- WebSysDefaultValueAttribute.cs
- ListViewAutomationPeer.cs
- SafeUserTokenHandle.cs
- ExternalException.cs
- DocumentPageTextView.cs
- XmlKeywords.cs
- SoundPlayer.cs
- XmlQualifiedName.cs
- TabItem.cs
- ClassicBorderDecorator.cs
- XmlEncoding.cs
- Help.cs
- MultilineStringConverter.cs
- DirectoryRootQuery.cs
- PageThemeBuildProvider.cs