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
- Roles.cs
- MenuEventArgs.cs
- Menu.cs
- WebRequest.cs
- List.cs
- EntityDataSourceMemberPath.cs
- IPEndPoint.cs
- ClientFormsIdentity.cs
- X509AudioLogo.cs
- SqlReorderer.cs
- TriState.cs
- CornerRadius.cs
- ContextStaticAttribute.cs
- ProvidePropertyAttribute.cs
- ForceCopyBuildProvider.cs
- hwndwrapper.cs
- StringPropertyBuilder.cs
- AxHost.cs
- DataGridViewBand.cs
- ExcCanonicalXml.cs
- MenuItemBinding.cs
- NumberFormatInfo.cs
- WebException.cs
- WindowsStreamSecurityUpgradeProvider.cs
- ExpressionConverter.cs
- EntityObject.cs
- BindingCollection.cs
- WebBrowserNavigatingEventHandler.cs
- X509CertificateTrustedIssuerElementCollection.cs
- ToolboxDataAttribute.cs
- ScalarType.cs
- ComplusEndpointConfigContainer.cs
- AssociationSetMetadata.cs
- PlainXmlDeserializer.cs
- BitmapSourceSafeMILHandle.cs
- CustomPopupPlacement.cs
- SmtpClient.cs
- ArrangedElementCollection.cs
- StateWorkerRequest.cs
- ProtocolsSection.cs
- StorageSetMapping.cs
- StorageModelBuildProvider.cs
- SqlInternalConnectionSmi.cs
- RadioButtonBaseAdapter.cs
- ConfigurationValue.cs
- connectionpool.cs
- Compiler.cs
- ImageDrawing.cs
- EDesignUtil.cs
- CompositeFontFamily.cs
- DataServiceQueryException.cs
- DBNull.cs
- PointAnimationUsingPath.cs
- ModulesEntry.cs
- GcSettings.cs
- DownloadProgressEventArgs.cs
- EasingKeyFrames.cs
- Int16AnimationUsingKeyFrames.cs
- XmlWrappingReader.cs
- AnimationTimeline.cs
- TreeNodeConverter.cs
- PerfCounters.cs
- DeflateStream.cs
- GridItemPattern.cs
- MessageEncoder.cs
- XmlBindingWorker.cs
- BidirectionalDictionary.cs
- MailDefinition.cs
- DispatcherExceptionEventArgs.cs
- NavigationPropertyEmitter.cs
- HttpWebRequest.cs
- DeliveryRequirementsAttribute.cs
- LightweightEntityWrapper.cs
- SchemaImporterExtensionElement.cs
- unsafeIndexingFilterStream.cs
- HttpCapabilitiesSectionHandler.cs
- CharacterBufferReference.cs
- RadioButtonBaseAdapter.cs
- rsa.cs
- XmlDataSource.cs
- PasswordRecovery.cs
- ExtensibleClassFactory.cs
- StructuredType.cs
- ListBox.cs
- InputLanguageProfileNotifySink.cs
- KeyFrames.cs
- TextTreeInsertElementUndoUnit.cs
- WebAdminConfigurationHelper.cs
- NegotiateStream.cs
- FileDialog.cs
- ValidatorCollection.cs
- DynamicField.cs
- WebPartTransformerAttribute.cs
- NaturalLanguageHyphenator.cs
- COM2ColorConverter.cs
- WindowsListViewItem.cs
- COM2ColorConverter.cs
- MostlySingletonList.cs
- ValidationSummaryDesigner.cs
- GeometryGroup.cs