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
- DataObjectFieldAttribute.cs
- mda.cs
- RequestUriProcessor.cs
- DataViewSetting.cs
- storepermissionattribute.cs
- DataListGeneralPage.cs
- Rotation3DAnimationUsingKeyFrames.cs
- SystemMulticastIPAddressInformation.cs
- SQLGuid.cs
- Facet.cs
- ExpressionVisitorHelpers.cs
- _FtpControlStream.cs
- MenuDesigner.cs
- WebPartCloseVerb.cs
- DependsOnAttribute.cs
- TripleDESCryptoServiceProvider.cs
- LogSwitch.cs
- DeploymentExceptionMapper.cs
- SoapHeader.cs
- DoubleCollection.cs
- StandardOleMarshalObject.cs
- HealthMonitoringSection.cs
- UnsafeNativeMethodsCLR.cs
- ChannelServices.cs
- MsmqInputMessagePool.cs
- EllipseGeometry.cs
- TileModeValidation.cs
- TimeManager.cs
- SiteOfOriginPart.cs
- Operand.cs
- LoadItemsEventArgs.cs
- HandlerFactoryWrapper.cs
- HttpServerUtilityBase.cs
- ScriptManager.cs
- UpdatePanelTriggerCollection.cs
- BaseCollection.cs
- KeyGesture.cs
- assertwrapper.cs
- PriorityRange.cs
- RegionInfo.cs
- TextProperties.cs
- ResourceExpressionBuilder.cs
- ProcessInfo.cs
- DbgUtil.cs
- Int32EqualityComparer.cs
- CompositeScriptReference.cs
- PrintDocument.cs
- Stylesheet.cs
- CircleHotSpot.cs
- SystemEvents.cs
- BindingNavigator.cs
- BitmapSource.cs
- NavigationProperty.cs
- SecurityPermission.cs
- HtmlWindow.cs
- ServicePoint.cs
- ValidationError.cs
- LinqDataSourceHelper.cs
- StringComparer.cs
- TextParagraph.cs
- xsdvalidator.cs
- TextChange.cs
- CodeTypeDeclaration.cs
- SafeCloseHandleCritical.cs
- SafeRightsManagementEnvironmentHandle.cs
- MarkupProperty.cs
- ObjectContextServiceProvider.cs
- AppPool.cs
- StandardOleMarshalObject.cs
- PublisherMembershipCondition.cs
- RootDesignerSerializerAttribute.cs
- XmlSchemaFacet.cs
- CertificateReferenceElement.cs
- URLIdentityPermission.cs
- DefaultPropertiesToSend.cs
- ResolveDuplex11AsyncResult.cs
- DataServiceQuery.cs
- FormsAuthenticationUserCollection.cs
- ProjectedSlot.cs
- DataGridRowEventArgs.cs
- DataTableReaderListener.cs
- DeviceContext.cs
- XmlDataImplementation.cs
- DeploymentExceptionMapper.cs
- BrowserDefinitionCollection.cs
- SafeFileMappingHandle.cs
- TextCollapsingProperties.cs
- CompareInfo.cs
- DesignerActionItemCollection.cs
- RequestCachePolicy.cs
- ExtensionWindowResizeGrip.cs
- ExtensionDataObject.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- MdiWindowListStrip.cs
- KnownIds.cs
- SizeAnimationBase.cs
- DbgUtil.cs
- SqlColumnizer.cs
- SecurityPermission.cs
- FileDialogCustomPlace.cs