Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / MS / Internal / Controls / CustomCategoryAttribute.cs / 1 / CustomCategoryAttribute.cs
using System; using System.ComponentModel; using MS.Internal; using System.Windows; using System.Diagnostics; using System.Globalization; namespace System.Windows { ////// Attribute which specifies additional category strings which can be localized: /// Accessibility, Content, Navigation. /// internal sealed class CustomCategoryAttribute : CategoryAttribute { internal CustomCategoryAttribute(string name) : base(name) { Debug.Assert("Content".Equals(name, StringComparison.InvariantCulture) || "Accessibility".Equals(name, StringComparison.InvariantCulture) || "Navigation".Equals(name, StringComparison.InvariantCulture)); } protected override string GetLocalizedString(string value) { // Return a localized version of the custom category if (String.Compare(value, "Content", StringComparison.Ordinal) == 0) return SR.Get(SRID.DesignerMetadata_CustomCategory_Content); else if(String.Compare(value, "Accessibility", StringComparison.Ordinal) == 0) return SR.Get(SRID.DesignerMetadata_CustomCategory_Accessibility); else /*if(String.Compare(value, "Navigation", StringComparison.Ordinal) == 0)*/ return SR.Get(SRID.DesignerMetadata_CustomCategory_Navigation); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.ComponentModel; using MS.Internal; using System.Windows; using System.Diagnostics; using System.Globalization; namespace System.Windows { ////// Attribute which specifies additional category strings which can be localized: /// Accessibility, Content, Navigation. /// internal sealed class CustomCategoryAttribute : CategoryAttribute { internal CustomCategoryAttribute(string name) : base(name) { Debug.Assert("Content".Equals(name, StringComparison.InvariantCulture) || "Accessibility".Equals(name, StringComparison.InvariantCulture) || "Navigation".Equals(name, StringComparison.InvariantCulture)); } protected override string GetLocalizedString(string value) { // Return a localized version of the custom category if (String.Compare(value, "Content", StringComparison.Ordinal) == 0) return SR.Get(SRID.DesignerMetadata_CustomCategory_Content); else if(String.Compare(value, "Accessibility", StringComparison.Ordinal) == 0) return SR.Get(SRID.DesignerMetadata_CustomCategory_Accessibility); else /*if(String.Compare(value, "Navigation", StringComparison.Ordinal) == 0)*/ return SR.Get(SRID.DesignerMetadata_CustomCategory_Navigation); } } } // 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
- ActivityPreviewDesigner.cs
- RealizationContext.cs
- NavigationService.cs
- MessageSmuggler.cs
- SignatureGenerator.cs
- StaticSiteMapProvider.cs
- OdbcConnectionPoolProviderInfo.cs
- KnownIds.cs
- XmlBoundElement.cs
- XmlSchemaComplexType.cs
- ThreadExceptionDialog.cs
- DataTableReaderListener.cs
- SuppressMessageAttribute.cs
- WeakRefEnumerator.cs
- BitmapDownload.cs
- Matrix.cs
- Binding.cs
- TableStyle.cs
- PermissionSet.cs
- RequestQueue.cs
- CellTreeNodeVisitors.cs
- MetadataFile.cs
- PersonalizationStateInfoCollection.cs
- XhtmlBasicTextViewAdapter.cs
- GrammarBuilder.cs
- SerializationAttributes.cs
- RelatedImageListAttribute.cs
- ObjectListCommandEventArgs.cs
- HtmlForm.cs
- SuppressMergeCheckAttribute.cs
- ResumeStoryboard.cs
- AppDomainProtocolHandler.cs
- ListViewGroupItemCollection.cs
- XPathBinder.cs
- ProviderConnectionPointCollection.cs
- RectangleConverter.cs
- AffineTransform3D.cs
- FirstMatchCodeGroup.cs
- LocatorManager.cs
- ImageAttributes.cs
- StandardCommands.cs
- SoapTypeAttribute.cs
- DelegateBodyWriter.cs
- BuildDependencySet.cs
- _HeaderInfoTable.cs
- FilteredXmlReader.cs
- ConfigurationSettings.cs
- ForceCopyBuildProvider.cs
- SystemIcmpV6Statistics.cs
- Rotation3DKeyFrameCollection.cs
- FilterException.cs
- coordinatorfactory.cs
- NativeWindow.cs
- DbBuffer.cs
- ForEachAction.cs
- ReverseInheritProperty.cs
- BehaviorDragDropEventArgs.cs
- recordstate.cs
- HeaderedContentControl.cs
- CryptoConfig.cs
- _SslState.cs
- ResourcePart.cs
- CompletionBookmark.cs
- x509utils.cs
- ServiceDescription.cs
- UrlPath.cs
- TypeConverterHelper.cs
- ContentPosition.cs
- FixedSOMElement.cs
- EmptyEnumerator.cs
- SearchForVirtualItemEventArgs.cs
- TextElement.cs
- SqlClientMetaDataCollectionNames.cs
- COM2FontConverter.cs
- DbDeleteCommandTree.cs
- GridItemProviderWrapper.cs
- SqlDataSourceCache.cs
- MouseEvent.cs
- ClientTarget.cs
- SafeMemoryMappedViewHandle.cs
- DataObjectAttribute.cs
- CatalogPartCollection.cs
- ListView.cs
- SqlRowUpdatingEvent.cs
- xml.cs
- base64Transforms.cs
- HelpPage.cs
- WebPartZoneCollection.cs
- MustUnderstandBehavior.cs
- SqlClientMetaDataCollectionNames.cs
- MiniLockedBorderGlyph.cs
- EditCommandColumn.cs
- Multiply.cs
- Padding.cs
- XmlSchemaElement.cs
- RetriableClipboard.cs
- DictionaryKeyPropertyAttribute.cs
- PermissionSetEnumerator.cs
- ApplicationBuildProvider.cs
- Label.cs