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
- WorkflowDesigner.cs
- ReferenceEqualityComparer.cs
- WmpBitmapDecoder.cs
- DeploymentExceptionMapper.cs
- MediaContextNotificationWindow.cs
- DllNotFoundException.cs
- WebProxyScriptElement.cs
- WindowInteractionStateTracker.cs
- SiteMapDataSource.cs
- EventMetadata.cs
- LocalTransaction.cs
- ColorKeyFrameCollection.cs
- PlatformNotSupportedException.cs
- UserMapPath.cs
- UniqueContractNameValidationBehavior.cs
- Win32MouseDevice.cs
- ContextStack.cs
- TCEAdapterGenerator.cs
- RenderTargetBitmap.cs
- ReliableMessagingVersion.cs
- TypeDelegator.cs
- DropShadowBitmapEffect.cs
- ContextProperty.cs
- HttpCapabilitiesSectionHandler.cs
- Authorization.cs
- SoapInteropTypes.cs
- BamlMapTable.cs
- PolyBezierSegmentFigureLogic.cs
- SQLChars.cs
- _ListenerRequestStream.cs
- DependencyPropertyKind.cs
- Semaphore.cs
- TextBounds.cs
- CreateUserErrorEventArgs.cs
- XDRSchema.cs
- UnmanagedBitmapWrapper.cs
- HttpModuleCollection.cs
- NetCodeGroup.cs
- SspiNegotiationTokenAuthenticator.cs
- EntityDataSourceContextDisposingEventArgs.cs
- FormattedText.cs
- SamlAuthorizationDecisionStatement.cs
- NavigationHelper.cs
- XmlEnumAttribute.cs
- BitmapMetadataEnumerator.cs
- HostingEnvironmentException.cs
- EntityDataSourceDataSelection.cs
- DateTimeOffset.cs
- ChannelManager.cs
- InternalCache.cs
- X509ChainElement.cs
- Profiler.cs
- SymmetricSecurityProtocolFactory.cs
- XmlSchemaInferenceException.cs
- CodeTypeReferenceExpression.cs
- CompiledQueryCacheKey.cs
- OpCopier.cs
- FixedPage.cs
- HwndSubclass.cs
- IndexedEnumerable.cs
- ImmComposition.cs
- WebOperationContext.cs
- Math.cs
- AtomicFile.cs
- DataErrorValidationRule.cs
- ConstraintConverter.cs
- ListViewInsertionMark.cs
- TypeLoadException.cs
- Calendar.cs
- UIElement3D.cs
- CultureSpecificStringDictionary.cs
- ArgumentOutOfRangeException.cs
- TextEmbeddedObject.cs
- PagedControl.cs
- DynamicResourceExtension.cs
- ManipulationVelocities.cs
- ListenerAdapter.cs
- MergeExecutor.cs
- TypeUtils.cs
- PackWebRequestFactory.cs
- TreeView.cs
- MetadataCache.cs
- BamlReader.cs
- Mouse.cs
- SelectionList.cs
- PasswordPropertyTextAttribute.cs
- BinaryObjectWriter.cs
- BasePattern.cs
- SHA512.cs
- ExternalCalls.cs
- WindowsListViewItemStartMenu.cs
- TableProviderWrapper.cs
- Control.cs
- Model3D.cs
- Utils.cs
- QueryStatement.cs
- WpfGeneratedKnownTypes.cs
- TextServicesCompartmentContext.cs
- BinaryUtilClasses.cs
- SystemNetHelpers.cs