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
- DrawingBrush.cs
- InstalledFontCollection.cs
- PrintDialogException.cs
- StandardTransformFactory.cs
- TextParagraphView.cs
- SqlInternalConnectionTds.cs
- ListenerAdapter.cs
- XslNumber.cs
- MaskedTextProvider.cs
- ForwardPositionQuery.cs
- TreeNodeCollectionEditor.cs
- CursorConverter.cs
- IdentityModelStringsVersion1.cs
- CharacterMetrics.cs
- TextPenaltyModule.cs
- followingquery.cs
- ScrollPatternIdentifiers.cs
- OdbcError.cs
- CapiSafeHandles.cs
- ConfigurationStrings.cs
- PolyLineSegmentFigureLogic.cs
- DetailsViewCommandEventArgs.cs
- TextStore.cs
- DataDocumentXPathNavigator.cs
- SessionStateSection.cs
- SharedStatics.cs
- ManipulationLogic.cs
- SynchronizationLockException.cs
- nulltextnavigator.cs
- SynthesizerStateChangedEventArgs.cs
- embossbitmapeffect.cs
- ContainerTracking.cs
- xamlnodes.cs
- Journal.cs
- StateInitialization.cs
- SafeCryptoHandles.cs
- ConfigurationElement.cs
- UpDownBase.cs
- SrgsElementFactory.cs
- CrossContextChannel.cs
- Psha1DerivedKeyGenerator.cs
- HostAdapter.cs
- UserPersonalizationStateInfo.cs
- VisualStates.cs
- PathFigureCollection.cs
- SimpleTypesSurrogate.cs
- XmlSchemaGroupRef.cs
- DocumentEventArgs.cs
- SHA512.cs
- ScaleTransform.cs
- NotificationContext.cs
- TableLayoutColumnStyleCollection.cs
- BamlTreeNode.cs
- InputProcessorProfiles.cs
- ListItemCollection.cs
- InputElement.cs
- MULTI_QI.cs
- AutomationEvent.cs
- MinMaxParagraphWidth.cs
- FtpCachePolicyElement.cs
- ToolStripContextMenu.cs
- SqlParameterCollection.cs
- SHA256Managed.cs
- SqlDataSourceFilteringEventArgs.cs
- ObjectQueryState.cs
- ServicesExceptionNotHandledEventArgs.cs
- WebBrowserContainer.cs
- QuerySafeNavigator.cs
- NamedPermissionSet.cs
- SqlDataAdapter.cs
- EdmType.cs
- MultiplexingDispatchMessageFormatter.cs
- DbConnectionPoolCounters.cs
- SemanticKeyElement.cs
- AutoGeneratedFieldProperties.cs
- namescope.cs
- DescendantQuery.cs
- GeneralTransform3DTo2D.cs
- Model3DGroup.cs
- BaseTemplateBuildProvider.cs
- X509CertificateCollection.cs
- SharedUtils.cs
- MeshGeometry3D.cs
- MarkupCompilePass1.cs
- SplayTreeNode.cs
- ProcessHostConfigUtils.cs
- ExpressionBuilderContext.cs
- WebPartEventArgs.cs
- BooleanConverter.cs
- TempFiles.cs
- _TLSstream.cs
- EUCJPEncoding.cs
- TextAutomationPeer.cs
- StackSpiller.cs
- HtmlElementEventArgs.cs
- ClientConfigurationSystem.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- BinaryMessageEncodingElement.cs
- SweepDirectionValidation.cs
- XmlCodeExporter.cs