Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ContractTypeNameCollection.cs
- ChildDocumentBlock.cs
- CheckBoxBaseAdapter.cs
- ControlPropertyNameConverter.cs
- ParameterReplacerVisitor.cs
- SqlFormatter.cs
- ProfileGroupSettings.cs
- input.cs
- DropDownList.cs
- DataSourceSelectArguments.cs
- InvalidDataException.cs
- XhtmlBasicValidatorAdapter.cs
- HttpHandlersSection.cs
- AssemblyCache.cs
- XmlSchemaFacet.cs
- XComponentModel.cs
- SizeConverter.cs
- Effect.cs
- XmlSerializerSection.cs
- BatchParser.cs
- PeerResolverSettings.cs
- AppSecurityManager.cs
- DeviceContext2.cs
- EntityCommand.cs
- UInt32Storage.cs
- CodeTypeParameter.cs
- SynthesizerStateChangedEventArgs.cs
- ObjectStateEntryDbDataRecord.cs
- ViewDesigner.cs
- wgx_render.cs
- Parsers.cs
- DoubleAnimationUsingPath.cs
- DataGridViewComboBoxColumn.cs
- XmlEncodedRawTextWriter.cs
- TransportSecurityProtocol.cs
- ToolboxComponentsCreatedEventArgs.cs
- XmlChildNodes.cs
- HandlerFactoryWrapper.cs
- UserControl.cs
- WebReferencesBuildProvider.cs
- BamlVersionHeader.cs
- DistinctQueryOperator.cs
- MessageHeaderT.cs
- AutomationElement.cs
- AdornerHitTestResult.cs
- SessionViewState.cs
- HttpModuleActionCollection.cs
- WebServiceErrorEvent.cs
- WebBrowserProgressChangedEventHandler.cs
- SchemaNotation.cs
- StrongNameKeyPair.cs
- XmlWriterTraceListener.cs
- TabControlCancelEvent.cs
- MediaElementAutomationPeer.cs
- DataControlFieldHeaderCell.cs
- ServerType.cs
- ZeroOpNode.cs
- MessageQuerySet.cs
- TextPattern.cs
- CompilerGlobalScopeAttribute.cs
- EntityDataSourceDataSelectionPanel.cs
- PixelFormat.cs
- PageAction.cs
- SQlBooleanStorage.cs
- TextDecorationCollection.cs
- ObjectSet.cs
- OwnerDrawPropertyBag.cs
- XmlUTF8TextWriter.cs
- HttpServerVarsCollection.cs
- Boolean.cs
- MouseOverProperty.cs
- AffineTransform3D.cs
- XmlSchemaImport.cs
- TextFormatterContext.cs
- TabPageDesigner.cs
- X509Certificate.cs
- ObjectReaderCompiler.cs
- MailAddressCollection.cs
- RegexGroupCollection.cs
- Transform3DGroup.cs
- DataGridItemCollection.cs
- InputLangChangeEvent.cs
- BasicViewGenerator.cs
- RuntimeConfig.cs
- DataSet.cs
- NotificationContext.cs
- MembershipSection.cs
- ComponentResourceManager.cs
- ObjectListComponentEditor.cs
- XmlChildNodes.cs
- NativeMethods.cs
- DBCSCodePageEncoding.cs
- ConditionalAttribute.cs
- BuildResult.cs
- SectionInput.cs
- EndpointBehaviorElement.cs
- DataGridViewBindingCompleteEventArgs.cs
- __Filters.cs
- Geometry.cs
- HyperLink.cs