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
- MDIClient.cs
- SoapFormatExtensions.cs
- CreateUserWizard.cs
- ObjectReaderCompiler.cs
- Missing.cs
- UrlEncodedParameterWriter.cs
- AlternateViewCollection.cs
- LinkButton.cs
- SafeCryptContextHandle.cs
- LocationSectionRecord.cs
- MaskedTextProvider.cs
- X509CertificateValidator.cs
- EastAsianLunisolarCalendar.cs
- ActionMismatchAddressingException.cs
- Matrix3DValueSerializer.cs
- CreatingCookieEventArgs.cs
- SwitchExpression.cs
- GraphicsPathIterator.cs
- ParseHttpDate.cs
- ResXResourceSet.cs
- ExpressionCopier.cs
- _AutoWebProxyScriptWrapper.cs
- HashCoreRequest.cs
- MetadataArtifactLoaderComposite.cs
- CustomLineCap.cs
- BitmapFrame.cs
- TrustSection.cs
- Int64AnimationBase.cs
- AnonymousIdentificationSection.cs
- DataGrid.cs
- PanelStyle.cs
- PartialCachingAttribute.cs
- HtmlShimManager.cs
- ProtocolProfile.cs
- sqlcontext.cs
- ConditionalExpression.cs
- MessagePropertyFilter.cs
- MemoryMappedViewAccessor.cs
- PanelContainerDesigner.cs
- FormatterConverter.cs
- ClientUtils.cs
- DynamicValueConverter.cs
- ClassHandlersStore.cs
- StrongNamePublicKeyBlob.cs
- AccessText.cs
- DataServiceContext.cs
- Visitors.cs
- ConstraintStruct.cs
- PrintPageEvent.cs
- PropertyPathConverter.cs
- ReflectTypeDescriptionProvider.cs
- ConfigsHelper.cs
- ResizingMessageFilter.cs
- ControlAdapter.cs
- CellNormalizer.cs
- InternalDuplexChannelFactory.cs
- MimeWriter.cs
- SafeReversePInvokeHandle.cs
- XmlHierarchicalEnumerable.cs
- EdmProperty.cs
- XmlLinkedNode.cs
- SoapFormatExtensions.cs
- UriWriter.cs
- DetailsViewInsertEventArgs.cs
- ADMembershipUser.cs
- SafeReversePInvokeHandle.cs
- ValueType.cs
- Window.cs
- CircleHotSpot.cs
- NamespaceEmitter.cs
- RegexTree.cs
- WebPartConnectionsCloseVerb.cs
- AdobeCFFWrapper.cs
- DbConnectionPoolGroup.cs
- InternalsVisibleToAttribute.cs
- SmtpNetworkElement.cs
- PreviewPrintController.cs
- GridViewDeleteEventArgs.cs
- TrackingStringDictionary.cs
- Component.cs
- sqlstateclientmanager.cs
- DocumentPaginator.cs
- SourceFilter.cs
- DataGridViewTextBoxColumn.cs
- SimpleBitVector32.cs
- OutOfMemoryException.cs
- StateWorkerRequest.cs
- ResetableIterator.cs
- ToolStripRenderer.cs
- UserPreferenceChangedEventArgs.cs
- PerformanceCounterPermissionAttribute.cs
- InternalsVisibleToAttribute.cs
- HttpDebugHandler.cs
- TypeHelpers.cs
- DataGridSortCommandEventArgs.cs
- DefaultBinder.cs
- SynchronizedReadOnlyCollection.cs
- DrawingContextWalker.cs
- PeerTransportListenAddressValidator.cs
- WinEventWrap.cs