Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PipelineComponent.cs
- CodeObjectCreateExpression.cs
- KeyGestureConverter.cs
- DocumentGridPage.cs
- GuidConverter.cs
- TransactionFlowOption.cs
- SystemUnicastIPAddressInformation.cs
- AddressHeader.cs
- UInt32.cs
- PageSettings.cs
- ProjectionCamera.cs
- TemplateControlParser.cs
- ComponentEditorPage.cs
- MemberBinding.cs
- HtmlFormWrapper.cs
- EndCreateSecurityTokenRequest.cs
- PropagatorResult.cs
- PreservationFileReader.cs
- control.ime.cs
- SmtpCommands.cs
- GridEntryCollection.cs
- ComNativeDescriptor.cs
- DataControlFieldCell.cs
- ListItemParagraph.cs
- Cursor.cs
- DragStartedEventArgs.cs
- MetadataHelper.cs
- CDSCollectionETWBCLProvider.cs
- GeneralTransform3DTo2D.cs
- Material.cs
- ContractMapping.cs
- ApplicationManager.cs
- _Rfc2616CacheValidators.cs
- MimeMapping.cs
- ImageAutomationPeer.cs
- NamespaceExpr.cs
- CallInfo.cs
- ListViewGroupCollectionEditor.cs
- RelationshipConstraintValidator.cs
- AtomPub10ServiceDocumentFormatter.cs
- SmtpLoginAuthenticationModule.cs
- BamlLocalizableResource.cs
- TextBoxBase.cs
- Brush.cs
- RoleService.cs
- ProxyManager.cs
- SourceFileBuildProvider.cs
- MaskedTextBox.cs
- LicenseProviderAttribute.cs
- FacetChecker.cs
- MouseActionValueSerializer.cs
- ConfigurationElementCollection.cs
- WindowsTokenRoleProvider.cs
- DataGridCaption.cs
- wgx_exports.cs
- CommandDevice.cs
- SecureUICommand.cs
- Constants.cs
- IconConverter.cs
- Int16Storage.cs
- StrokeSerializer.cs
- HealthMonitoringSection.cs
- QueryOperationResponseOfT.cs
- DetailsViewModeEventArgs.cs
- QilTernary.cs
- GridItemProviderWrapper.cs
- ColumnMap.cs
- Pair.cs
- cookie.cs
- CookieProtection.cs
- wgx_render.cs
- ResourcePool.cs
- TimerEventSubscriptionCollection.cs
- SemaphoreSecurity.cs
- PhonemeConverter.cs
- IteratorFilter.cs
- SqlRecordBuffer.cs
- InputScopeConverter.cs
- LinearGradientBrush.cs
- ConfigurationSectionCollection.cs
- AvtEvent.cs
- OuterGlowBitmapEffect.cs
- DataGridViewCellParsingEventArgs.cs
- IdentityManager.cs
- SmiContextFactory.cs
- StringFreezingAttribute.cs
- SqlDependency.cs
- MetadataSerializer.cs
- AgileSafeNativeMemoryHandle.cs
- CompletedAsyncResult.cs
- ToolStripArrowRenderEventArgs.cs
- ToolStripMenuItemCodeDomSerializer.cs
- FormattedText.cs
- ServicesUtilities.cs
- GlyphRunDrawing.cs
- DataMember.cs
- ReadOnlyMetadataCollection.cs
- DomNameTable.cs
- PerformanceCountersElement.cs
- ParameterBuilder.cs