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
- ImageCodecInfo.cs
- TextRangeSerialization.cs
- StringFreezingAttribute.cs
- NTAccount.cs
- PowerStatus.cs
- DataGridViewAdvancedBorderStyle.cs
- Point.cs
- EventBindingService.cs
- WebPartTransformerCollection.cs
- BuildDependencySet.cs
- SparseMemoryStream.cs
- _DomainName.cs
- CompileLiteralTextParser.cs
- ArgumentDesigner.xaml.cs
- BreakSafeBase.cs
- MetafileHeaderWmf.cs
- ClientSponsor.cs
- Form.cs
- EntityDataSourceStatementEditorForm.cs
- CmsUtils.cs
- ColumnReorderedEventArgs.cs
- ProjectionPathSegment.cs
- ErrorRuntimeConfig.cs
- HttpDictionary.cs
- CapiHashAlgorithm.cs
- assertwrapper.cs
- OLEDB_Enum.cs
- ThemeDictionaryExtension.cs
- RadioButton.cs
- ReferenceConverter.cs
- StringConverter.cs
- MediaEntryAttribute.cs
- DriveInfo.cs
- ResourceDictionaryCollection.cs
- StateRuntime.cs
- CategoryAttribute.cs
- SqlConnectionHelper.cs
- TrustManagerMoreInformation.cs
- AssemblyNameEqualityComparer.cs
- ServerValidateEventArgs.cs
- KeyGestureValueSerializer.cs
- Animatable.cs
- SqlNodeAnnotations.cs
- InputProcessorProfiles.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- StandardCommands.cs
- PropertyKey.cs
- SQLResource.cs
- FlowchartDesigner.xaml.cs
- ReaderOutput.cs
- SponsorHelper.cs
- CommandArguments.cs
- templategroup.cs
- ObjectManager.cs
- FormViewCommandEventArgs.cs
- TextEmbeddedObject.cs
- Model3DGroup.cs
- TypeViewSchema.cs
- XPathNavigator.cs
- ExtendedProperty.cs
- SerialPort.cs
- TextElementEnumerator.cs
- SqlTriggerAttribute.cs
- LOSFormatter.cs
- ProgramNode.cs
- UserPreference.cs
- Point3DIndependentAnimationStorage.cs
- StyleBamlTreeBuilder.cs
- InstancePersistenceCommandException.cs
- DefaultTextStoreTextComposition.cs
- ButtonBaseAdapter.cs
- ProxyWebPartConnectionCollection.cs
- CommandLineParser.cs
- Walker.cs
- DockPanel.cs
- DataGridViewMethods.cs
- SqlDataSourceSelectingEventArgs.cs
- ISFClipboardData.cs
- WindowsSecurityToken.cs
- Propagator.JoinPropagator.cs
- StickyNoteContentControl.cs
- TriggerCollection.cs
- SqlPersonalizationProvider.cs
- XmlStreamedByteStreamReader.cs
- CSharpCodeProvider.cs
- TabItemWrapperAutomationPeer.cs
- Ref.cs
- ErrorWebPart.cs
- WindowsFormsHostAutomationPeer.cs
- ButtonColumn.cs
- SamlAuthenticationStatement.cs
- precedingsibling.cs
- DetailsViewDeletedEventArgs.cs
- Shape.cs
- SessionIDManager.cs
- FileStream.cs
- ReadingWritingEntityEventArgs.cs
- DocumentViewerHelper.cs
- _UriTypeConverter.cs
- TemplatePropertyEntry.cs