Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- AssertSection.cs
- ZoneIdentityPermission.cs
- StylusDownEventArgs.cs
- ListViewInsertionMark.cs
- RequiredFieldValidator.cs
- ToolStripSeparatorRenderEventArgs.cs
- BindingValueChangedEventArgs.cs
- UntrustedRecipientException.cs
- ExceptionHandlerDesigner.cs
- ControlAdapter.cs
- PathTooLongException.cs
- MediaContext.cs
- ComplexTypeEmitter.cs
- WindowsRegion.cs
- EmbeddedObject.cs
- ListViewEditEventArgs.cs
- SqlInfoMessageEvent.cs
- QuaternionValueSerializer.cs
- SQLResource.cs
- GACIdentityPermission.cs
- ScrollEventArgs.cs
- XmlElementCollection.cs
- XmlObjectSerializerReadContext.cs
- GeometryHitTestParameters.cs
- SqlProvider.cs
- Wildcard.cs
- OdbcConnectionOpen.cs
- BinaryVersion.cs
- HTTPNotFoundHandler.cs
- MergablePropertyAttribute.cs
- NativeMethods.cs
- ApplicationSettingsBase.cs
- ClientApiGenerator.cs
- SR.cs
- SQLUtility.cs
- FileAuthorizationModule.cs
- PropertyDescriptorCollection.cs
- SafeBitVector32.cs
- EncoderFallback.cs
- PageParserFilter.cs
- ManagementOptions.cs
- PasswordPropertyTextAttribute.cs
- XsdDuration.cs
- DataServiceRequestOfT.cs
- SessionEndedEventArgs.cs
- MLangCodePageEncoding.cs
- Vector3dCollection.cs
- SafeProcessHandle.cs
- DesignerPerfEventProvider.cs
- SafeRightsManagementHandle.cs
- FixedDocumentSequencePaginator.cs
- Error.cs
- ValidationResult.cs
- CollectionViewProxy.cs
- OleDbRowUpdatedEvent.cs
- SecureEnvironment.cs
- activationcontext.cs
- MethodCallTranslator.cs
- MessageContractImporter.cs
- SoapEnumAttribute.cs
- Clock.cs
- TextCompositionManager.cs
- TypeHelper.cs
- ColorAnimationUsingKeyFrames.cs
- HttpWebRequest.cs
- NavigationPropertyEmitter.cs
- _AuthenticationState.cs
- UInt16Storage.cs
- EmptyEnumerable.cs
- AttributeTable.cs
- DocumentPageView.cs
- OracleColumn.cs
- ControlPaint.cs
- Permission.cs
- ConfigurationElementCollection.cs
- Module.cs
- TraceContext.cs
- TrustManagerPromptUI.cs
- DataServiceProviderMethods.cs
- ShutDownListener.cs
- ImageDrawing.cs
- ReflectionPermission.cs
- XmlRawWriter.cs
- SafePointer.cs
- ScaleTransform.cs
- FaultReason.cs
- FormViewDeletedEventArgs.cs
- OpenFileDialog.cs
- Imaging.cs
- BaseConfigurationRecord.cs
- TransactionManager.cs
- XmlILStorageConverter.cs
- XmlSchemaSet.cs
- PageParser.cs
- MimeWriter.cs
- AncestorChangedEventArgs.cs
- DivideByZeroException.cs
- DefaultBinder.cs
- FixedSOMLineRanges.cs
- MachineKeyConverter.cs