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
- Journal.cs
- ContextStaticAttribute.cs
- FunctionMappingTranslator.cs
- ObjectMemberMapping.cs
- StreamInfo.cs
- ExecutedRoutedEventArgs.cs
- XmlDownloadManager.cs
- ListViewGroupItemCollection.cs
- CroppedBitmap.cs
- ContextConfiguration.cs
- Symbol.cs
- TextElementCollectionHelper.cs
- Int32Animation.cs
- TableAutomationPeer.cs
- TextParagraphView.cs
- URLString.cs
- DataGridColumnReorderingEventArgs.cs
- XmlSchemaObject.cs
- SqlNamer.cs
- MtomMessageEncodingBindingElement.cs
- XmlUtf8RawTextWriter.cs
- Logging.cs
- Registry.cs
- ParallelTimeline.cs
- XsltException.cs
- NativeMethods.cs
- SqlInternalConnectionSmi.cs
- TypeHelpers.cs
- SqlMethods.cs
- WebPartConnection.cs
- ParagraphResult.cs
- NonClientArea.cs
- XmlNotation.cs
- MethodToken.cs
- CompiledXpathExpr.cs
- AssemblyBuilder.cs
- DbException.cs
- UnauthorizedWebPart.cs
- TcpClientSocketManager.cs
- Events.cs
- ModuleBuilderData.cs
- DesignerListAdapter.cs
- PolyQuadraticBezierSegment.cs
- LongValidator.cs
- OracleDataReader.cs
- Dictionary.cs
- GroupItemAutomationPeer.cs
- RoleService.cs
- SortQuery.cs
- DataRecordInternal.cs
- AsyncOperation.cs
- PngBitmapDecoder.cs
- DocumentSequence.cs
- NameValueFileSectionHandler.cs
- InputManager.cs
- DBCommandBuilder.cs
- XmlQueryType.cs
- ExeContext.cs
- ReadOnlyTernaryTree.cs
- XmlSchemaImport.cs
- FontFamily.cs
- TabControlEvent.cs
- JavascriptCallbackResponseProperty.cs
- AssemblyNameEqualityComparer.cs
- Int64Storage.cs
- COM2PictureConverter.cs
- DebuggerService.cs
- TypeUtil.cs
- TagMapCollection.cs
- Invariant.cs
- TextTreeText.cs
- BinaryFormatter.cs
- DialogResultConverter.cs
- RowUpdatingEventArgs.cs
- BlobPersonalizationState.cs
- path.cs
- ResourceExpression.cs
- BindingObserver.cs
- TransactedReceiveScope.cs
- DllNotFoundException.cs
- SafeSecurityHandles.cs
- XmlSerializer.cs
- AutoGeneratedField.cs
- ApplicationFileParser.cs
- SvcMapFileSerializer.cs
- AdornedElementPlaceholder.cs
- IDataContractSurrogate.cs
- UIElement3D.cs
- CriticalExceptions.cs
- ReflectPropertyDescriptor.cs
- EventSetter.cs
- SafeWaitHandle.cs
- AnimationTimeline.cs
- TdsRecordBufferSetter.cs
- TreeViewCancelEvent.cs
- DataRelationPropertyDescriptor.cs
- CombinedGeometry.cs
- DataObjectMethodAttribute.cs
- TransformGroup.cs
- DynamicILGenerator.cs