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
- InvokeBinder.cs
- WebBrowsableAttribute.cs
- TrackingServices.cs
- versioninfo.cs
- HandledMouseEvent.cs
- WizardStepBase.cs
- ImageCodecInfoPrivate.cs
- HtmlToClrEventProxy.cs
- StrongNameUtility.cs
- EntityDataSourceUtil.cs
- DecimalAnimation.cs
- ExpressionQuoter.cs
- TextSegment.cs
- MailBnfHelper.cs
- NegatedConstant.cs
- XmlSchemaImport.cs
- MethodImplAttribute.cs
- CharConverter.cs
- BindingRestrictions.cs
- SmiXetterAccessMap.cs
- DataGridTextBox.cs
- MembershipUser.cs
- HijriCalendar.cs
- XmlCharCheckingReader.cs
- SweepDirectionValidation.cs
- SqlWriter.cs
- CompletedAsyncResult.cs
- MessageDescriptionCollection.cs
- RenderingBiasValidation.cs
- DataGridBoolColumn.cs
- DoubleCollection.cs
- NumericPagerField.cs
- ColorConverter.cs
- OperationCanceledException.cs
- SafeUserTokenHandle.cs
- InputDevice.cs
- DebugInfoExpression.cs
- StateWorkerRequest.cs
- SuppressMergeCheckAttribute.cs
- HostingEnvironmentException.cs
- MailSettingsSection.cs
- StickyNoteAnnotations.cs
- SerialReceived.cs
- ConditionalAttribute.cs
- MasterPageCodeDomTreeGenerator.cs
- DirectoryInfo.cs
- DataSourceSelectArguments.cs
- UInt16.cs
- SmiEventStream.cs
- CoTaskMemHandle.cs
- ToolboxComponentsCreatedEventArgs.cs
- ChildChangedEventArgs.cs
- URLAttribute.cs
- ToolStripItemImageRenderEventArgs.cs
- SafeEventLogWriteHandle.cs
- NegationPusher.cs
- MessageEnumerator.cs
- ForeignKeyConstraint.cs
- DataConnectionHelper.cs
- ComponentChangingEvent.cs
- MetadataFile.cs
- DesignerHelpers.cs
- HuffModule.cs
- TargetControlTypeCache.cs
- X509CertificateValidator.cs
- Queue.cs
- NavigationProgressEventArgs.cs
- WhitespaceRuleReader.cs
- ProcessManager.cs
- TransformerConfigurationWizardBase.cs
- CommandManager.cs
- ReflectEventDescriptor.cs
- loginstatus.cs
- TypeConverterHelper.cs
- _HTTPDateParse.cs
- Utils.cs
- TreeNode.cs
- WebHttpSecurityElement.cs
- ParameterElement.cs
- TableCell.cs
- AppModelKnownContentFactory.cs
- ColumnProvider.cs
- WindowsAuthenticationEventArgs.cs
- TableItemStyle.cs
- FontStyle.cs
- XmlSchemaSimpleTypeUnion.cs
- _ConnectionGroup.cs
- Aggregates.cs
- XmlAttribute.cs
- Version.cs
- SingleKeyFrameCollection.cs
- StateManagedCollection.cs
- TextServicesCompartment.cs
- ApplicationManager.cs
- ItemsControl.cs
- ZoneIdentityPermission.cs
- DeploymentSectionCache.cs
- ConfigurationValidatorBase.cs
- _FixedSizeReader.cs
- SmtpFailedRecipientException.cs