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
- FixedSOMTextRun.cs
- OdbcParameter.cs
- SqlMetaData.cs
- XPathMessageFilter.cs
- VisualCollection.cs
- CompiledQueryCacheKey.cs
- PageTheme.cs
- DataPager.cs
- ToolStripItemRenderEventArgs.cs
- VectorCollectionValueSerializer.cs
- RefreshPropertiesAttribute.cs
- PlaceHolder.cs
- MaterialGroup.cs
- UnsafeNativeMethodsCLR.cs
- DropShadowBitmapEffect.cs
- XmlCollation.cs
- ProxyManager.cs
- ClrProviderManifest.cs
- DoubleCollection.cs
- TemplateManager.cs
- SpStreamWrapper.cs
- UnsafeNativeMethods.cs
- PointConverter.cs
- ProvidePropertyAttribute.cs
- RegistryKey.cs
- RetrieveVirtualItemEventArgs.cs
- SortQuery.cs
- ToolStripComboBox.cs
- MethodBuilderInstantiation.cs
- DeferredTextReference.cs
- FirstMatchCodeGroup.cs
- DataColumn.cs
- ToolStripComboBox.cs
- ReferencedAssembly.cs
- ListViewDataItem.cs
- DuplicateContext.cs
- CodeGroup.cs
- RegexCompiler.cs
- WrapPanel.cs
- ListSourceHelper.cs
- CodeGotoStatement.cs
- AsyncCompletedEventArgs.cs
- StatementContext.cs
- ContextItemManager.cs
- InlineUIContainer.cs
- XmlQuerySequence.cs
- ProgramNode.cs
- NonSerializedAttribute.cs
- WorkflowRuntimeSection.cs
- OleDbRowUpdatingEvent.cs
- FixedHighlight.cs
- UpDownEvent.cs
- TextEvent.cs
- PathSegmentCollection.cs
- SizeChangedInfo.cs
- ListBoxItemWrapperAutomationPeer.cs
- PassportPrincipal.cs
- SerializationSectionGroup.cs
- SQLDouble.cs
- SuspendDesigner.cs
- PagedControl.cs
- FrameworkTemplate.cs
- COMException.cs
- EntryPointNotFoundException.cs
- xmlsaver.cs
- EditCommandColumn.cs
- BuildResult.cs
- SQlBooleanStorage.cs
- Tablet.cs
- DateTimeValueSerializerContext.cs
- NamedElement.cs
- StrongNamePublicKeyBlob.cs
- Facet.cs
- DocumentPageTextView.cs
- Button.cs
- ActiveXHost.cs
- Int16Animation.cs
- TextTreeObjectNode.cs
- DbConnectionPool.cs
- HttpConfigurationContext.cs
- ConfigurationSectionCollection.cs
- AutoSizeToolBoxItem.cs
- AdornerLayer.cs
- ItemsPanelTemplate.cs
- WebReferenceOptions.cs
- LabelDesigner.cs
- RelationshipWrapper.cs
- HtmlInputText.cs
- CommandManager.cs
- AlternateView.cs
- TextTreeRootNode.cs
- EntityProviderServices.cs
- TextReader.cs
- SimpleTableProvider.cs
- CollectionsUtil.cs
- PeerNodeTraceRecord.cs
- DataGridRowDetailsEventArgs.cs
- MainMenu.cs
- ResourcePermissionBase.cs
- HtmlTableCell.cs