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
- COM2EnumConverter.cs
- CompensationParticipant.cs
- SymbolPair.cs
- NavigationPropertyEmitter.cs
- TiffBitmapDecoder.cs
- SizeAnimationUsingKeyFrames.cs
- StreamedFramingRequestChannel.cs
- SimpleWorkerRequest.cs
- PathSegmentCollection.cs
- DbProviderManifest.cs
- DeferredElementTreeState.cs
- CodeChecksumPragma.cs
- XPathDocumentIterator.cs
- CompModSwitches.cs
- Operators.cs
- TreeIterator.cs
- EpmTargetTree.cs
- ArraySortHelper.cs
- PropertyChangingEventArgs.cs
- ProfileService.cs
- OutputCacheProfileCollection.cs
- Stream.cs
- Html32TextWriter.cs
- ConfigViewGenerator.cs
- PersonalizationAdministration.cs
- Msmq.cs
- RSAPKCS1KeyExchangeFormatter.cs
- BCLDebug.cs
- FrameDimension.cs
- IgnoreDeviceFilterElementCollection.cs
- IDataContractSurrogate.cs
- CellNormalizer.cs
- BitmapEffectState.cs
- DataStreams.cs
- FixedElement.cs
- ToolStripSplitButton.cs
- NativeMethods.cs
- EnumerableCollectionView.cs
- ToolStripManager.cs
- StoreItemCollection.Loader.cs
- TransformValueSerializer.cs
- CharKeyFrameCollection.cs
- QilBinary.cs
- HealthMonitoringSection.cs
- StylusPointPropertyInfoDefaults.cs
- ToolStripButton.cs
- FunctionDescription.cs
- HttpRuntimeSection.cs
- InlineUIContainer.cs
- AxisAngleRotation3D.cs
- PersonalizationStateInfoCollection.cs
- AuthenticateEventArgs.cs
- DiagnosticTraceSource.cs
- ReflectionTypeLoadException.cs
- Win32NamedPipes.cs
- PropagationProtocolsTracing.cs
- Math.cs
- InlineObject.cs
- AggregationMinMaxHelpers.cs
- InternalTypeHelper.cs
- WebServiceParameterData.cs
- KeyTimeConverter.cs
- ParallelEnumerableWrapper.cs
- ChannelSinkStacks.cs
- SQLBinary.cs
- HtmlValidationSummaryAdapter.cs
- MapPathBasedVirtualPathProvider.cs
- OrderToken.cs
- RegexMatchCollection.cs
- RequiredFieldValidator.cs
- WebConfigurationManager.cs
- Comparer.cs
- CallbackValidator.cs
- Encoding.cs
- ClientRuntimeConfig.cs
- OleDbError.cs
- BamlCollectionHolder.cs
- ProxyWebPartManager.cs
- TextRangeAdaptor.cs
- PropertyMetadata.cs
- Point4DConverter.cs
- PolicyConversionContext.cs
- FontWeight.cs
- ConnectionPoint.cs
- ApplicationInfo.cs
- RegexBoyerMoore.cs
- ShapingWorkspace.cs
- SafeArrayRankMismatchException.cs
- EmptyEnumerable.cs
- XComponentModel.cs
- BackgroundWorker.cs
- ResXFileRef.cs
- EntityStoreSchemaGenerator.cs
- KnowledgeBase.cs
- TextEncodedRawTextWriter.cs
- XmlSerializerFactory.cs
- SqlLiftWhereClauses.cs
- Calendar.cs
- regiisutil.cs
- HttpCacheParams.cs