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
- TimeSpan.cs
- MD5.cs
- PersistenceTypeAttribute.cs
- DaylightTime.cs
- LateBoundBitmapDecoder.cs
- DependencyPropertyKind.cs
- BitmapEffectDrawing.cs
- EntitySqlQueryCacheEntry.cs
- DataGridViewCellStateChangedEventArgs.cs
- BaseParagraph.cs
- RequestContextBase.cs
- OracleConnectionString.cs
- XsltLibrary.cs
- AuthenticateEventArgs.cs
- Decimal.cs
- DomNameTable.cs
- TrackingDataItemValue.cs
- FixedSOMPageElement.cs
- Enum.cs
- RecognizeCompletedEventArgs.cs
- Identity.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- MachineKeySection.cs
- DispatcherOperation.cs
- IdentifierService.cs
- HotCommands.cs
- Selection.cs
- ContainerFilterService.cs
- UnknownMessageReceivedEventArgs.cs
- HtmlTable.cs
- OracleConnectionStringBuilder.cs
- CreateUserWizardStep.cs
- ServiceModelPerformanceCounters.cs
- Vector3DAnimationUsingKeyFrames.cs
- StructuralCache.cs
- AuthStoreRoleProvider.cs
- AuthenticatedStream.cs
- DisplayToken.cs
- StateMachine.cs
- CachedTypeface.cs
- dataprotectionpermissionattribute.cs
- DrawingContextWalker.cs
- _CommandStream.cs
- SelectorAutomationPeer.cs
- ServiceDesigner.xaml.cs
- NativeRightsManagementAPIsStructures.cs
- ResourceKey.cs
- IPipelineRuntime.cs
- BaseCodeDomTreeGenerator.cs
- DelimitedListTraceListener.cs
- TraceUtility.cs
- PostBackOptions.cs
- DeviceSpecificChoiceCollection.cs
- BaseProcessor.cs
- CaretElement.cs
- ControlPager.cs
- TypeConvertions.cs
- XPathScanner.cs
- DataGridViewCell.cs
- TextTreeRootNode.cs
- BufferedStream.cs
- DependencyPropertyKind.cs
- MessageSmuggler.cs
- ActivationArguments.cs
- VersionConverter.cs
- SqlConnectionFactory.cs
- IndexerNameAttribute.cs
- XmlIlVisitor.cs
- PointLightBase.cs
- Gdiplus.cs
- DataGridViewIntLinkedList.cs
- ArithmeticLiteral.cs
- HwndPanningFeedback.cs
- InfoCardTraceRecord.cs
- TextElement.cs
- ListBoxAutomationPeer.cs
- CompilationSection.cs
- MDIControlStrip.cs
- NoneExcludedImageIndexConverter.cs
- SafeMarshalContext.cs
- SynchronizedDispatch.cs
- DataGridViewRow.cs
- UnorderedHashRepartitionStream.cs
- Int16Storage.cs
- RepeaterItemEventArgs.cs
- VoiceObjectToken.cs
- NamespaceEmitter.cs
- ControlCodeDomSerializer.cs
- NavigationPropertySingletonExpression.cs
- SystemDropShadowChrome.cs
- MappableObjectManager.cs
- ShaderEffect.cs
- CodeGeneratorOptions.cs
- HelloMessageCD1.cs
- CodeDomSerializerBase.cs
- DesignerFrame.cs
- Rect3D.cs
- SafeNativeMethods.cs
- WizardSideBarListControlItem.cs
- CodeDirectiveCollection.cs