Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- ByteRangeDownloader.cs
- ToolStripDropDownClosedEventArgs.cs
- FixedNode.cs
- EventHandlersStore.cs
- ManualResetEvent.cs
- IssuedSecurityTokenProvider.cs
- WebPart.cs
- StringAttributeCollection.cs
- DefaultObjectMappingItemCollection.cs
- VirtualizedContainerService.cs
- EncodingNLS.cs
- Roles.cs
- XmlQualifiedName.cs
- TextElementEnumerator.cs
- AnnouncementInnerClient11.cs
- X509ChainElement.cs
- Timer.cs
- KeyConverter.cs
- DrawingContextDrawingContextWalker.cs
- ConfigurationManagerHelper.cs
- LocalBuilder.cs
- BitSet.cs
- PrefixQName.cs
- ContractReference.cs
- Triplet.cs
- Section.cs
- Point3DCollectionValueSerializer.cs
- PartialArray.cs
- MonitorWrapper.cs
- ObjectItemCollection.cs
- Attributes.cs
- IndexingContentUnit.cs
- DesignerTextBoxAdapter.cs
- RegistrySecurity.cs
- BuildResult.cs
- MediaScriptCommandRoutedEventArgs.cs
- arc.cs
- ClaimTypeElementCollection.cs
- TextSimpleMarkerProperties.cs
- SoapMessage.cs
- WebPartConnectionsConnectVerb.cs
- DocumentXmlWriter.cs
- bidPrivateBase.cs
- NativeMethods.cs
- EncodingDataItem.cs
- KnownTypes.cs
- HttpStreamFormatter.cs
- XamlTemplateSerializer.cs
- CacheForPrimitiveTypes.cs
- HtmlTable.cs
- EntryWrittenEventArgs.cs
- Overlapped.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- FlowDocument.cs
- FormatterServices.cs
- DiscoveryDefaults.cs
- RoleManagerModule.cs
- AutomationElementIdentifiers.cs
- EditCommandColumn.cs
- SafePEFileHandle.cs
- FlowDocument.cs
- TextBoxBase.cs
- CompiledRegexRunner.cs
- BaseDataListComponentEditor.cs
- SqlNode.cs
- SystemEvents.cs
- BackgroundWorker.cs
- XPathMultyIterator.cs
- TdsParser.cs
- NetworkStream.cs
- RenamedEventArgs.cs
- AspCompat.cs
- ResourcesBuildProvider.cs
- WorkflowLayouts.cs
- HtmlElementEventArgs.cs
- PathSegment.cs
- PropertiesTab.cs
- RadioButtonPopupAdapter.cs
- RSAOAEPKeyExchangeDeformatter.cs
- RootBrowserWindowAutomationPeer.cs
- FixedPage.cs
- BamlRecordReader.cs
- MsmqTransportElement.cs
- HTTPNotFoundHandler.cs
- WebBrowserProgressChangedEventHandler.cs
- DefaultSection.cs
- DrawingVisual.cs
- TextContainerHelper.cs
- UserControl.cs
- UInt32.cs
- CalloutQueueItem.cs
- BufferedGraphicsContext.cs
- MapPathBasedVirtualPathProvider.cs
- TextOutput.cs
- SoapFault.cs
- X509Certificate.cs
- NullableDoubleAverageAggregationOperator.cs
- HwndSubclass.cs
- SqlConnectionString.cs
- TextServicesCompartmentEventSink.cs