Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- OleDbErrorCollection.cs
- StrokeDescriptor.cs
- DBSqlParserTableCollection.cs
- RepeaterDesigner.cs
- StoreContentChangedEventArgs.cs
- ConfigurationSettings.cs
- GetWorkflowTree.cs
- Visitors.cs
- ColorConverter.cs
- Bezier.cs
- SetStateDesigner.cs
- _KerberosClient.cs
- SHA512CryptoServiceProvider.cs
- OneWayBindingElement.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- BufferedGraphicsManager.cs
- RoleService.cs
- SupportsEventValidationAttribute.cs
- WaitForChangedResult.cs
- InvalidDataException.cs
- SpeechEvent.cs
- DiscoveryDocumentSerializer.cs
- PtsPage.cs
- TokenizerHelper.cs
- XmlSchemaAttribute.cs
- infer.cs
- DropDownList.cs
- FormatterConverter.cs
- CatalogZoneDesigner.cs
- Material.cs
- CursorInteropHelper.cs
- GeometryModel3D.cs
- WebPartTransformerAttribute.cs
- IDReferencePropertyAttribute.cs
- SqlTypeConverter.cs
- AssemblyHash.cs
- Events.cs
- CollectionConverter.cs
- SpAudioStreamWrapper.cs
- HtmlInputHidden.cs
- PtsPage.cs
- _emptywebproxy.cs
- TransformerInfoCollection.cs
- isolationinterop.cs
- ToggleProviderWrapper.cs
- StagingAreaInputItem.cs
- ScriptDescriptor.cs
- Parallel.cs
- AnimatedTypeHelpers.cs
- BufferModesCollection.cs
- ProfileInfo.cs
- MethodExpression.cs
- SQLDateTime.cs
- URLAttribute.cs
- ListParagraph.cs
- COM2EnumConverter.cs
- WebPartMenuStyle.cs
- TimelineClockCollection.cs
- ForEachAction.cs
- DictionaryEntry.cs
- MessageSmuggler.cs
- StaticFileHandler.cs
- HostProtectionException.cs
- FlowDocumentPage.cs
- TreeNodeBinding.cs
- SiteMapNodeItem.cs
- DLinqColumnProvider.cs
- TreeNodeCollection.cs
- ArrangedElementCollection.cs
- Calendar.cs
- MimeImporter.cs
- ToolboxItem.cs
- DispatchWrapper.cs
- FormatterServices.cs
- TextTreeTextNode.cs
- CompiledWorkflowDefinitionContext.cs
- XhtmlBasicTextBoxAdapter.cs
- WebPartCancelEventArgs.cs
- SafeLocalAllocation.cs
- EntityWrapper.cs
- DesignerSerializationOptionsAttribute.cs
- DeclaredTypeValidatorAttribute.cs
- CalendarDesigner.cs
- SelectionPatternIdentifiers.cs
- DrawListViewItemEventArgs.cs
- IDispatchConstantAttribute.cs
- CodeStatement.cs
- OdbcConnectionStringbuilder.cs
- AnalyzedTree.cs
- DocumentPageView.cs
- ContentWrapperAttribute.cs
- BuildProvider.cs
- PackUriHelper.cs
- SqlDataSourceView.cs
- MatrixConverter.cs
- X509SecurityTokenAuthenticator.cs
- HttpModuleAction.cs
- ModifierKeysValueSerializer.cs
- SafeHandle.cs
- ApplicationManager.cs