Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / SystemThemeKey.cs / 1305600 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TreeIterator.cs
- PropertyChangedEventArgs.cs
- TypeConverterValueSerializer.cs
- ISO2022Encoding.cs
- PolyBezierSegment.cs
- DefaultValueAttribute.cs
- Timeline.cs
- HtmlImageAdapter.cs
- LogStore.cs
- XmlIncludeAttribute.cs
- Asn1IntegerConverter.cs
- DeclarativeCatalogPart.cs
- Script.cs
- NotifyInputEventArgs.cs
- SerialPort.cs
- ListBindableAttribute.cs
- SHA256.cs
- PropertyInformationCollection.cs
- ObjectIDGenerator.cs
- XmlReturnReader.cs
- Geometry.cs
- FtpWebRequest.cs
- XPathParser.cs
- DataGridViewAccessibleObject.cs
- EntityViewGenerationAttribute.cs
- AssemblyCacheEntry.cs
- MexBindingElement.cs
- TransactionInterop.cs
- DataGridViewComboBoxCell.cs
- OracleBoolean.cs
- SessionSwitchEventArgs.cs
- ViewSimplifier.cs
- UniqueEventHelper.cs
- UidPropertyAttribute.cs
- CompoundFileStorageReference.cs
- DbParameterCollectionHelper.cs
- MappingException.cs
- Deflater.cs
- RequestDescription.cs
- BeginEvent.cs
- WindowsFormsHostPropertyMap.cs
- listitem.cs
- Effect.cs
- ControlAdapter.cs
- CallbackValidator.cs
- NumericExpr.cs
- ZoneLinkButton.cs
- ThaiBuddhistCalendar.cs
- ThrowOnMultipleAssignment.cs
- CallbackBehaviorAttribute.cs
- PresentationSource.cs
- ExpressionStringBuilder.cs
- ToolStripPanelCell.cs
- ChangePassword.cs
- NamedObject.cs
- OpenFileDialog.cs
- SHA256Managed.cs
- UserUseLicenseDictionaryLoader.cs
- ToolStripOverflowButton.cs
- AnalyzedTree.cs
- AutomationTextAttribute.cs
- CursorInteropHelper.cs
- FixedSOMGroup.cs
- MeasurementDCInfo.cs
- URLString.cs
- _ListenerAsyncResult.cs
- VectorCollectionConverter.cs
- X509SecurityTokenProvider.cs
- Selector.cs
- ScrollItemProviderWrapper.cs
- CodeGotoStatement.cs
- Keyboard.cs
- WebBrowser.cs
- MaskedTextBox.cs
- FrameworkContentElementAutomationPeer.cs
- DataSourceExpressionCollection.cs
- FileCodeGroup.cs
- DbExpressionRules.cs
- PropertyStore.cs
- TreeNodeEventArgs.cs
- DataBoundControlHelper.cs
- DBConnection.cs
- EventOpcode.cs
- DataSourceListEditor.cs
- Int32Storage.cs
- PageParser.cs
- OdbcConnectionPoolProviderInfo.cs
- FusionWrap.cs
- UriTemplateVariableQueryValue.cs
- ResourcesChangeInfo.cs
- AppSettingsSection.cs
- TextCollapsingProperties.cs
- ResourceProperty.cs
- RuleRefElement.cs
- BookmarkInfo.cs
- Update.cs
- GifBitmapEncoder.cs
- BinaryReader.cs
- DataGridPageChangedEventArgs.cs
- OutputCacheSection.cs