Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- UncommonField.cs
- Stroke.cs
- ControlUtil.cs
- TextEndOfSegment.cs
- HTTPRemotingHandler.cs
- Label.cs
- XmlValidatingReader.cs
- Comparer.cs
- StringUtil.cs
- XPathScanner.cs
- OperationParameterInfoCollection.cs
- AttachInfo.cs
- ProcessManager.cs
- GorillaCodec.cs
- KeyManager.cs
- OleDbRowUpdatingEvent.cs
- TypeSystemProvider.cs
- MulticastDelegate.cs
- MethodImplAttribute.cs
- LicenseManager.cs
- QilPatternVisitor.cs
- TreeViewHitTestInfo.cs
- TimeSpan.cs
- CompositeCollection.cs
- CodeBinaryOperatorExpression.cs
- Predicate.cs
- ImageFormat.cs
- SqlDuplicator.cs
- ToolboxComponentsCreatedEventArgs.cs
- KnownBoxes.cs
- MemberRestriction.cs
- _FixedSizeReader.cs
- ScopeElement.cs
- PropertyToken.cs
- EmptyEnumerator.cs
- MemberProjectedSlot.cs
- XPathDescendantIterator.cs
- PowerStatus.cs
- Barrier.cs
- SimpleWebHandlerParser.cs
- CompoundFileStorageReference.cs
- ActivityDesignerResources.cs
- ActionFrame.cs
- ReadonlyMessageFilter.cs
- X509RecipientCertificateServiceElement.cs
- ServicePointManagerElement.cs
- CalendarDataBindingHandler.cs
- PathSegmentCollection.cs
- AnnouncementEndpointElement.cs
- COM2PictureConverter.cs
- SafeFileHandle.cs
- ApplicationActivator.cs
- TextRangeAdaptor.cs
- CodeGenHelper.cs
- XamlReader.cs
- WebBrowserProgressChangedEventHandler.cs
- ServiceDurableInstance.cs
- sortedlist.cs
- TdsParameterSetter.cs
- ColumnReorderedEventArgs.cs
- HorizontalAlignConverter.cs
- AsyncOperationLifetimeManager.cs
- HtmlObjectListAdapter.cs
- DateTimeOffsetAdapter.cs
- BitFlagsGenerator.cs
- HttpCacheVaryByContentEncodings.cs
- TrackBar.cs
- ColorAnimationBase.cs
- HtmlTextViewAdapter.cs
- MediaTimeline.cs
- Control.cs
- LogPolicy.cs
- DebugView.cs
- StrongNameIdentityPermission.cs
- COM2PictureConverter.cs
- coordinatorscratchpad.cs
- MimeXmlReflector.cs
- ElementProxy.cs
- MouseGestureConverter.cs
- MultiAsyncResult.cs
- XmlSchemaSimpleType.cs
- SqlRowUpdatedEvent.cs
- AutoCompleteStringCollection.cs
- safelink.cs
- DataList.cs
- X509SecurityTokenProvider.cs
- SafeEventHandle.cs
- GroupBoxRenderer.cs
- WindowsUpDown.cs
- FieldDescriptor.cs
- CodeExpressionCollection.cs
- QilCloneVisitor.cs
- FontUnitConverter.cs
- HtmlInputText.cs
- SystemColors.cs
- WebBrowserProgressChangedEventHandler.cs
- HashAlgorithm.cs
- ClrProviderManifest.cs
- Label.cs
- GreenMethods.cs