Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- SqlNamer.cs
- RijndaelManagedTransform.cs
- FullTextState.cs
- PassportAuthenticationEventArgs.cs
- XamlHostingConfiguration.cs
- WebServiceErrorEvent.cs
- TemplatedMailWebEventProvider.cs
- WebPartEditVerb.cs
- XsdDuration.cs
- _OSSOCK.cs
- MultipartIdentifier.cs
- RemoteX509AsymmetricSecurityKey.cs
- PolyQuadraticBezierSegment.cs
- AllMembershipCondition.cs
- AlgoModule.cs
- ImageListImage.cs
- Int64KeyFrameCollection.cs
- PersonalizationStateInfoCollection.cs
- PolicyLevel.cs
- DbParameterHelper.cs
- ResourceDefaultValueAttribute.cs
- MdiWindowListItemConverter.cs
- InfoCardBaseException.cs
- ToolBarOverflowPanel.cs
- CryptoKeySecurity.cs
- TrustManager.cs
- ViewStateException.cs
- Interlocked.cs
- UrlPropertyAttribute.cs
- ToolStripItemClickedEventArgs.cs
- updatecommandorderer.cs
- EnumType.cs
- CellRelation.cs
- SamlSubjectStatement.cs
- LabelLiteral.cs
- Button.cs
- SafeFileMappingHandle.cs
- ExpressionReplacer.cs
- DispatcherTimer.cs
- InstanceOwnerQueryResult.cs
- ColumnResizeUndoUnit.cs
- UTF7Encoding.cs
- ObjectPersistData.cs
- SchemaElementDecl.cs
- XmlBinaryReader.cs
- TrackingRecord.cs
- ImageAttributes.cs
- DataSysAttribute.cs
- cookie.cs
- WindowsListViewItem.cs
- Point4D.cs
- UpdateCommand.cs
- XmlSchemaRedefine.cs
- SapiRecoContext.cs
- XmlWriter.cs
- PropertyOverridesDialog.cs
- UnsafeNativeMethods.cs
- OptimizedTemplateContent.cs
- MetadataCacheItem.cs
- OdbcConnectionPoolProviderInfo.cs
- RefExpr.cs
- DocumentViewer.cs
- UrlAuthorizationModule.cs
- BaseTreeIterator.cs
- HtmlMeta.cs
- StrokeNodeEnumerator.cs
- PropertyRecord.cs
- XmlSchemaProviderAttribute.cs
- QueryPageSettingsEventArgs.cs
- OneOfElement.cs
- GeometryValueSerializer.cs
- DrawToolTipEventArgs.cs
- EllipseGeometry.cs
- PagesChangedEventArgs.cs
- TextStore.cs
- BitmapEffectDrawingContextState.cs
- NamespaceQuery.cs
- XmlTextWriter.cs
- VisualCollection.cs
- BamlResourceDeserializer.cs
- Win32PrintDialog.cs
- AgileSafeNativeMemoryHandle.cs
- QilReplaceVisitor.cs
- Processor.cs
- LayoutDump.cs
- MatrixCamera.cs
- PointIndependentAnimationStorage.cs
- InfoCardX509Validator.cs
- FrameworkReadOnlyPropertyMetadata.cs
- KeyValueInternalCollection.cs
- MemoryFailPoint.cs
- DbConnectionPoolIdentity.cs
- ConsoleKeyInfo.cs
- RuntimeVariableList.cs
- BindableAttribute.cs
- ReadOnlyDataSourceView.cs
- X509CertificateTrustedIssuerElement.cs
- BitmapEffectGeneralTransform.cs
- WindowsBrush.cs
- WhitespaceReader.cs