Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / LabelAutomationPeer.cs / 1305600 / 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; } // 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; } // 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
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- WebResponse.cs
- MultipartIdentifier.cs
- DataSourceProvider.cs
- EmbeddedMailObject.cs
- RequestResizeEvent.cs
- OdbcUtils.cs
- GiveFeedbackEvent.cs
- recordstatefactory.cs
- Selector.cs
- ThreadNeutralSemaphore.cs
- ParseHttpDate.cs
- DataRelation.cs
- ResourcesBuildProvider.cs
- RawUIStateInputReport.cs
- TimerElapsedEvenArgs.cs
- SectionRecord.cs
- RSACryptoServiceProvider.cs
- AnnotationResourceCollection.cs
- MyContact.cs
- XmlQueryContext.cs
- EventManager.cs
- TreeNodeEventArgs.cs
- prompt.cs
- DataGridRelationshipRow.cs
- ImpersonationContext.cs
- PenContexts.cs
- EventMappingSettings.cs
- CopyAttributesAction.cs
- XPathSingletonIterator.cs
- ClientScriptManager.cs
- ResourceDefaultValueAttribute.cs
- LayoutEngine.cs
- WeakReferenceList.cs
- Baml2006Reader.cs
- SuppressIldasmAttribute.cs
- SingleTagSectionHandler.cs
- MemoryFailPoint.cs
- FormViewUpdateEventArgs.cs
- QuaternionAnimationBase.cs
- XmlSchemaValidationException.cs
- BufferCache.cs
- WorkBatch.cs
- SessionStateItemCollection.cs
- MapPathBasedVirtualPathProvider.cs
- HelpInfo.cs
- XmlEncodedRawTextWriter.cs
- ComponentDispatcherThread.cs
- Debug.cs
- WebPartEditorApplyVerb.cs
- BitmapEffectDrawingContextWalker.cs
- MetadataItem_Static.cs
- GridViewUpdateEventArgs.cs
- Msmq.cs
- CopyAction.cs
- StagingAreaInputItem.cs
- documentsequencetextcontainer.cs
- NativeWrapper.cs
- RoutedEventConverter.cs
- ButtonStandardAdapter.cs
- LinkClickEvent.cs
- MarginCollapsingState.cs
- ProfilePropertySettings.cs
- SelectionProviderWrapper.cs
- IisTraceListener.cs
- AppDomainFactory.cs
- SelectionProcessor.cs
- LinkedList.cs
- SessionState.cs
- MemberExpression.cs
- autovalidator.cs
- Icon.cs
- SafeUserTokenHandle.cs
- TemplateBamlTreeBuilder.cs
- SqlDataSourceQueryConverter.cs
- InputLanguage.cs
- ContentDesigner.cs
- ComplexObject.cs
- COM2FontConverter.cs
- RotateTransform.cs
- ComboBox.cs
- ClrProviderManifest.cs
- AnnotationHighlightLayer.cs
- VirtualPath.cs
- AddingNewEventArgs.cs
- ISAPIWorkerRequest.cs
- StreamResourceInfo.cs
- DesignerExtenders.cs
- SecurityDescriptor.cs
- AnnotationMap.cs
- ProcessInputEventArgs.cs
- UserNameSecurityTokenAuthenticator.cs
- AdRotator.cs
- ServiceRoute.cs
- CodeDefaultValueExpression.cs
- HMACMD5.cs
- MinMaxParagraphWidth.cs
- MenuRendererStandards.cs
- FloaterParaClient.cs
- RecognizeCompletedEventArgs.cs