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
- DataControlField.cs
- RequestContextBase.cs
- AdornerHitTestResult.cs
- Label.cs
- WeakKeyDictionary.cs
- DecimalMinMaxAggregationOperator.cs
- TextBoxBaseDesigner.cs
- XmlReaderSettings.cs
- CompleteWizardStep.cs
- StringPropertyBuilder.cs
- InstalledFontCollection.cs
- AssemblyResourceLoader.cs
- DataGridDetailsPresenter.cs
- AttributedMetaModel.cs
- SQLByte.cs
- CultureInfoConverter.cs
- Validator.cs
- ExceptionHandlerDesigner.cs
- KnownTypesHelper.cs
- WorkflowRuntime.cs
- DataGridViewLayoutData.cs
- ImportCatalogPart.cs
- ResolveCompletedEventArgs.cs
- PrintDialog.cs
- Vars.cs
- DispatcherFrame.cs
- NavigationWindow.cs
- TreeView.cs
- Animatable.cs
- ExpanderAutomationPeer.cs
- ProfileModule.cs
- ScriptResourceInfo.cs
- MouseActionConverter.cs
- TimersDescriptionAttribute.cs
- InstanceNotFoundException.cs
- StrokeIntersection.cs
- XsdDateTime.cs
- SineEase.cs
- HostingEnvironmentException.cs
- XmlHierarchyData.cs
- Misc.cs
- MetadataWorkspace.cs
- ListViewGroupItemCollection.cs
- IndependentAnimationStorage.cs
- RectAnimationUsingKeyFrames.cs
- LingerOption.cs
- CommandCollectionEditor.cs
- EasingQuaternionKeyFrame.cs
- ScriptComponentDescriptor.cs
- QueryContinueDragEvent.cs
- ValueType.cs
- GrammarBuilder.cs
- ArrayExtension.cs
- StdValidatorsAndConverters.cs
- TypeValidationEventArgs.cs
- DefaultProxySection.cs
- ListManagerBindingsCollection.cs
- SyndicationContent.cs
- ReaderContextStackData.cs
- SafeViewOfFileHandle.cs
- ReaderWriterLock.cs
- ParameterInfo.cs
- FreezableOperations.cs
- GeneralTransform.cs
- returneventsaver.cs
- XmlSchemaSimpleTypeUnion.cs
- RepeatButtonAutomationPeer.cs
- ParserStreamGeometryContext.cs
- EventRoute.cs
- ISAPIWorkerRequest.cs
- EtwTrace.cs
- BoolExpression.cs
- Soap.cs
- FieldAccessException.cs
- CompilerHelpers.cs
- DataControlFieldHeaderCell.cs
- StrongNameIdentityPermission.cs
- StringSource.cs
- ReaderWriterLockWrapper.cs
- UIntPtr.cs
- StringWriter.cs
- Directory.cs
- ActivityCodeGenerator.cs
- TrustManagerPromptUI.cs
- RemotingSurrogateSelector.cs
- WebEventTraceProvider.cs
- WebPartPersonalization.cs
- EmptyTextWriter.cs
- SystemIPInterfaceProperties.cs
- RoleManagerEventArgs.cs
- CleanUpVirtualizedItemEventArgs.cs
- XmlUnspecifiedAttribute.cs
- Inline.cs
- Directory.cs
- CommonXSendMessage.cs
- OleDbSchemaGuid.cs
- SymbolDocumentInfo.cs
- CodeParameterDeclarationExpression.cs
- CssStyleCollection.cs
- FunctionQuery.cs