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
- MimeMapping.cs
- XmlSchemaChoice.cs
- RoutedCommand.cs
- CodeDelegateCreateExpression.cs
- templategroup.cs
- PolicyVersion.cs
- AsyncPostBackErrorEventArgs.cs
- GridViewUpdateEventArgs.cs
- AlignmentXValidation.cs
- HtmlHistory.cs
- QueryCoreOp.cs
- TrackingDataItem.cs
- TypeDelegator.cs
- PassportAuthentication.cs
- Pair.cs
- CopyOfAction.cs
- WizardStepBase.cs
- TransformedBitmap.cs
- TdsValueSetter.cs
- FlowDocumentPageViewerAutomationPeer.cs
- QueryStringConverter.cs
- DataQuery.cs
- ThreadLocal.cs
- ExpressionConverter.cs
- Point3DCollectionValueSerializer.cs
- ImplicitInputBrush.cs
- ThreadStateException.cs
- MetadataFile.cs
- XamlClipboardData.cs
- CapabilitiesRule.cs
- TextTreeUndo.cs
- GeometryDrawing.cs
- Substitution.cs
- hresults.cs
- SystemIPAddressInformation.cs
- TextEditorMouse.cs
- XmlExceptionHelper.cs
- WCFServiceClientProxyGenerator.cs
- InputMethodStateTypeInfo.cs
- MaterialGroup.cs
- OdbcFactory.cs
- EntityParameter.cs
- TraceData.cs
- CaseInsensitiveOrdinalStringComparer.cs
- MulticastOption.cs
- SetterBaseCollection.cs
- TextureBrush.cs
- NavigationWindowAutomationPeer.cs
- DataControlReferenceCollection.cs
- TreeBuilderBamlTranslator.cs
- LoginCancelEventArgs.cs
- DBSchemaTable.cs
- ImageDrawing.cs
- FixedTextBuilder.cs
- ProfileGroupSettingsCollection.cs
- ArgumentsParser.cs
- PrivilegedConfigurationManager.cs
- ComponentEditorPage.cs
- SmiEventSink.cs
- DataGridViewElement.cs
- UInt32Storage.cs
- DemultiplexingClientMessageFormatter.cs
- SqlInternalConnection.cs
- FusionWrap.cs
- TextReader.cs
- HttpGetProtocolReflector.cs
- ChildTable.cs
- MaterialGroup.cs
- MultipleFilterMatchesException.cs
- ZipPackagePart.cs
- MissingFieldException.cs
- CategoryAttribute.cs
- Error.cs
- JsonQNameDataContract.cs
- CodeAttributeDeclaration.cs
- CapabilitiesAssignment.cs
- ClientBuildManagerCallback.cs
- DesignerUtils.cs
- EventTrigger.cs
- BindingEntityInfo.cs
- UnsafeNativeMethods.cs
- MemberPathMap.cs
- AuthenticationServiceManager.cs
- KeyNotFoundException.cs
- BinaryUtilClasses.cs
- MachineKeySection.cs
- WebSysDefaultValueAttribute.cs
- EllipticalNodeOperations.cs
- TreeNodeMouseHoverEvent.cs
- DocumentViewerAutomationPeer.cs
- Models.cs
- ComplexTypeEmitter.cs
- MimeImporter.cs
- SvcFileManager.cs
- DBSqlParserTable.cs
- DataException.cs
- PrintDialogDesigner.cs
- XmlSchemaAttribute.cs
- OdbcParameter.cs
- nulltextnavigator.cs