Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- Registration.cs
- FrameworkElementFactoryMarkupObject.cs
- ModelFactory.cs
- SettingsProviderCollection.cs
- AuthorizationRule.cs
- PathFigure.cs
- RepeaterItem.cs
- CreateUserWizardDesigner.cs
- BCLDebug.cs
- lengthconverter.cs
- CodeIndexerExpression.cs
- BuildProvidersCompiler.cs
- DataGridDesigner.cs
- Rijndael.cs
- GroupBoxRenderer.cs
- SiteIdentityPermission.cs
- SqlWorkflowInstanceStoreLock.cs
- InternalTypeHelper.cs
- ColorTranslator.cs
- XmlDigitalSignatureProcessor.cs
- NetworkCredential.cs
- StringPropertyBuilder.cs
- Utils.cs
- SelectionChangedEventArgs.cs
- BindingElementExtensionElement.cs
- ColumnCollectionEditor.cs
- DataBoundControl.cs
- BasicExpandProvider.cs
- WorkItem.cs
- Label.cs
- LicenseManager.cs
- CalendarDay.cs
- ApplicationSettingsBase.cs
- SqlProfileProvider.cs
- SectionInformation.cs
- JumpList.cs
- WSDualHttpBinding.cs
- MDIControlStrip.cs
- GridViewRowCollection.cs
- CompositionAdorner.cs
- PageThemeCodeDomTreeGenerator.cs
- ValidationError.cs
- SRGSCompiler.cs
- WorkflowInvoker.cs
- HttpDebugHandler.cs
- NativeCppClassAttribute.cs
- DispatchChannelSink.cs
- Math.cs
- OdbcUtils.cs
- XmlElementAttribute.cs
- Converter.cs
- RootProjectionNode.cs
- MimeBasePart.cs
- ServerTooBusyException.cs
- PhysicalAddress.cs
- XhtmlBasicPageAdapter.cs
- SelectionEditingBehavior.cs
- CompiledRegexRunnerFactory.cs
- SerializationStore.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- OperationBehaviorAttribute.cs
- PathGeometry.cs
- SmtpFailedRecipientException.cs
- XmlMapping.cs
- EmbeddedObject.cs
- MonitorWrapper.cs
- CommonBehaviorsSection.cs
- SQLBoolean.cs
- FixedSOMTable.cs
- SafeNativeMethods.cs
- precedingquery.cs
- DelayedRegex.cs
- KeyNotFoundException.cs
- MethodBuilderInstantiation.cs
- SqlUtils.cs
- SecurityPermission.cs
- HttpClientProtocol.cs
- SharedUtils.cs
- AssemblyName.cs
- TextCompositionManager.cs
- ErrorHandlingReceiver.cs
- SHA256Managed.cs
- BindingExpression.cs
- NominalTypeEliminator.cs
- GenericUI.cs
- DoubleCollection.cs
- ReservationCollection.cs
- MdImport.cs
- AttributeData.cs
- SplitContainerDesigner.cs
- RectConverter.cs
- ContainerParaClient.cs
- DispatcherTimer.cs
- XmlSerializationGeneratedCode.cs
- StrokeNodeEnumerator.cs
- DbParameterCollectionHelper.cs
- SqlDataAdapter.cs
- Qualifier.cs
- _NegoState.cs
- PrintingPermissionAttribute.cs