Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / Controls / CustomCategoryAttribute.cs / 1305600 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DBParameter.cs
- DataTableMapping.cs
- NonParentingControl.cs
- SpanIndex.cs
- DoubleKeyFrameCollection.cs
- ZipIOExtraFieldZip64Element.cs
- ComboBoxRenderer.cs
- DivideByZeroException.cs
- PerfProviderCollection.cs
- TerminatorSinks.cs
- XPathNodeIterator.cs
- DataRowCollection.cs
- RegisteredScript.cs
- DesignTableCollection.cs
- XmlComment.cs
- ResourceDisplayNameAttribute.cs
- CriticalHandle.cs
- TemplatedEditableDesignerRegion.cs
- WebException.cs
- Int32AnimationBase.cs
- PackageRelationshipSelector.cs
- Walker.cs
- DebugController.cs
- OutputCacheProfileCollection.cs
- WindowsServiceCredential.cs
- Tracer.cs
- VScrollProperties.cs
- ByteStorage.cs
- FixedSOMLineCollection.cs
- BinaryMessageEncodingBindingElement.cs
- XmlTextAttribute.cs
- SqlInfoMessageEvent.cs
- SmiXetterAccessMap.cs
- ScriptReference.cs
- EventLogPermission.cs
- TextReader.cs
- CustomSignedXml.cs
- ProcessProtocolHandler.cs
- MouseOverProperty.cs
- Geometry3D.cs
- OrderedDictionary.cs
- Int64Animation.cs
- SystemIPInterfaceProperties.cs
- CompositeCollectionView.cs
- SoapSchemaMember.cs
- WebServiceReceiveDesigner.cs
- EventLogEntryCollection.cs
- DesignerCalendarAdapter.cs
- DynamicRendererThreadManager.cs
- columnmapkeybuilder.cs
- SqlProviderUtilities.cs
- SqlSupersetValidator.cs
- XmlSchemaInferenceException.cs
- TextPattern.cs
- ObjectStateManagerMetadata.cs
- ToolStripManager.cs
- StylusButtonCollection.cs
- NamedPipeDuplicateContext.cs
- OperandQuery.cs
- XmlQueryStaticData.cs
- RandomDelayQueuedSendsAsyncResult.cs
- XmlEncoding.cs
- OciEnlistContext.cs
- GPRECTF.cs
- EventLogPermission.cs
- MatrixTransform3D.cs
- PromptEventArgs.cs
- WindowsGraphicsWrapper.cs
- KeyTime.cs
- MenuBindingsEditorForm.cs
- Match.cs
- ServiceBehaviorElement.cs
- Trace.cs
- Lease.cs
- Operators.cs
- InertiaRotationBehavior.cs
- TableLayoutSettingsTypeConverter.cs
- ASCIIEncoding.cs
- FontCacheUtil.cs
- XmlAttributeCache.cs
- WebPartCatalogAddVerb.cs
- SecurityTraceRecordHelper.cs
- EntityUtil.cs
- SqlDataReader.cs
- XmlAttributeOverrides.cs
- ByValueEqualityComparer.cs
- CompoundFileStreamReference.cs
- DataRecord.cs
- BulletChrome.cs
- CodeAttributeDeclaration.cs
- CapabilitiesSection.cs
- LinqTreeNodeEvaluator.cs
- XmlReflectionImporter.cs
- ContextMenuStrip.cs
- TagNameToTypeMapper.cs
- SendMailErrorEventArgs.cs
- GridPatternIdentifiers.cs
- fixedPageContentExtractor.cs
- OptimalBreakSession.cs
- XmlAttributeOverrides.cs