Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Automation / Peers / LabelAutomationPeer.cs / 1 / LabelAutomationPeer.cs
using System; using System.Runtime.InteropServices; using System.Security; using System.Text; using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Interop; using System.Windows.Media; using MS.Internal; using MS.Win32; namespace System.Windows.Automation.Peers { /// public class LabelAutomationPeer : FrameworkElementAutomationPeer { /// public LabelAutomationPeer(Label owner): base(owner) {} /// override protected string GetClassNameCore() { return "Text"; } /// override protected AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.Text; } /// override public object GetPattern(PatternInterface patternInterface) { return null; } // Return the base without the AccessKey character /// override protected string GetNameCore() { string result = base.GetNameCore(); if (!string.IsNullOrEmpty(result)) { Label label = (Label)Owner; if (label.Content is string) { return AccessText.RemoveAccessKeyMarker(result); } } return result; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Runtime.InteropServices; using System.Security; using System.Text; using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Interop; using System.Windows.Media; using MS.Internal; using MS.Win32; namespace System.Windows.Automation.Peers { /// public class LabelAutomationPeer : FrameworkElementAutomationPeer { /// public LabelAutomationPeer(Label owner): base(owner) {} /// override protected string GetClassNameCore() { return "Text"; } /// override protected AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.Text; } /// override public object GetPattern(PatternInterface patternInterface) { return null; } // Return the base without the AccessKey character /// override protected string GetNameCore() { string result = base.GetNameCore(); if (!string.IsNullOrEmpty(result)) { Label label = (Label)Owner; if (label.Content is string) { return AccessText.RemoveAccessKeyMarker(result); } } return result; } } } // 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
- ListViewInsertEventArgs.cs
- PrimaryKeyTypeConverter.cs
- DataControlImageButton.cs
- ThemeableAttribute.cs
- SerialReceived.cs
- OdbcStatementHandle.cs
- DataGridViewCheckBoxCell.cs
- PathBox.cs
- TextServicesManager.cs
- Module.cs
- SoapCodeExporter.cs
- SoapAttributeAttribute.cs
- Tokenizer.cs
- Point3DCollection.cs
- GeometryModel3D.cs
- ConstructorNeedsTagAttribute.cs
- EtwTrace.cs
- AutoGeneratedField.cs
- VerificationException.cs
- SchemaImporterExtensionElement.cs
- XmlValidatingReader.cs
- RelationshipConverter.cs
- XamlSerializerUtil.cs
- ResourceContainer.cs
- Fonts.cs
- XPathSelfQuery.cs
- StoreItemCollection.cs
- HealthMonitoringSection.cs
- MailAddressParser.cs
- Sentence.cs
- BamlLocalizableResourceKey.cs
- PersonalizationDictionary.cs
- DecoderBestFitFallback.cs
- _LazyAsyncResult.cs
- PassportAuthenticationEventArgs.cs
- FastEncoder.cs
- FamilyTypeface.cs
- DbConnectionPoolCounters.cs
- DataShape.cs
- ServiceReference.cs
- DispatcherHooks.cs
- PromptEventArgs.cs
- Int32CollectionConverter.cs
- ListItem.cs
- BufferedWebEventProvider.cs
- Pkcs9Attribute.cs
- Debug.cs
- StreamingContext.cs
- FixUpCollection.cs
- StringUtil.cs
- TextTreeRootNode.cs
- DataGridItemAutomationPeer.cs
- IUnknownConstantAttribute.cs
- InternalControlCollection.cs
- X509Chain.cs
- CommonRemoteMemoryBlock.cs
- FunctionNode.cs
- UIntPtr.cs
- IndexedString.cs
- RoleManagerSection.cs
- FrugalMap.cs
- OrderedDictionaryStateHelper.cs
- XdrBuilder.cs
- ClientFormsAuthenticationCredentials.cs
- DoubleIndependentAnimationStorage.cs
- FigureParagraph.cs
- safemediahandle.cs
- AttributeEmitter.cs
- IQueryable.cs
- ConnectionManagementElementCollection.cs
- DiscoveryReferences.cs
- Point3DKeyFrameCollection.cs
- Animatable.cs
- ActivityTypeCodeDomSerializer.cs
- Quaternion.cs
- UiaCoreApi.cs
- Vector3DCollection.cs
- DataGridViewLayoutData.cs
- GridViewColumnCollectionChangedEventArgs.cs
- Storyboard.cs
- SelectedDatesCollection.cs
- RadioButtonList.cs
- ToolStripOverflowButton.cs
- BaseTreeIterator.cs
- InheritedPropertyDescriptor.cs
- ListBox.cs
- ActivityCollectionMarkupSerializer.cs
- Propagator.Evaluator.cs
- TreeNode.cs
- SourceInterpreter.cs
- DataContractSerializerOperationBehavior.cs
- TriState.cs
- OlePropertyStructs.cs
- RegionIterator.cs
- CapabilitiesPattern.cs
- BlockExpression.cs
- CodeRegionDirective.cs
- MailBnfHelper.cs
- MessagePartDescriptionCollection.cs
- DataGridViewCellPaintingEventArgs.cs