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
- ClipboardData.cs
- MessagePropertyFilter.cs
- Receive.cs
- HandlerMappingMemo.cs
- IDQuery.cs
- SqlErrorCollection.cs
- DrawingImage.cs
- HtmlPanelAdapter.cs
- HttpListenerException.cs
- SecurityPermission.cs
- ObjectTag.cs
- ScriptingRoleServiceSection.cs
- PersonalizableAttribute.cs
- HttpCachePolicyElement.cs
- CompilationSection.cs
- SmtpDigestAuthenticationModule.cs
- TextDecoration.cs
- SqlGatherProducedAliases.cs
- ManipulationStartedEventArgs.cs
- ToolZoneDesigner.cs
- exports.cs
- MonthChangedEventArgs.cs
- AssertSection.cs
- EmbeddedMailObject.cs
- path.cs
- SystemIPv6InterfaceProperties.cs
- OdbcInfoMessageEvent.cs
- MemberHolder.cs
- FrameworkElementFactoryMarkupObject.cs
- SqlDataSourceCommandEventArgs.cs
- XmlElementAttribute.cs
- TextSerializer.cs
- ComplusTypeValidator.cs
- SQLBytesStorage.cs
- DocumentGrid.cs
- grammarelement.cs
- WindowCollection.cs
- XmlSchemaSimpleTypeList.cs
- WriterOutput.cs
- WorkflowCreationContext.cs
- DocumentSchemaValidator.cs
- RectangleGeometry.cs
- ScriptRegistrationManager.cs
- OdbcException.cs
- OperationResponse.cs
- GroupItem.cs
- XhtmlBasicListAdapter.cs
- TypeDescriptor.cs
- ParameterSubsegment.cs
- DataError.cs
- SqlTypesSchemaImporter.cs
- XmlWellformedWriter.cs
- CalendarDesigner.cs
- _TransmitFileOverlappedAsyncResult.cs
- Int32CollectionConverter.cs
- ObfuscateAssemblyAttribute.cs
- ThemeDirectoryCompiler.cs
- FakeModelPropertyImpl.cs
- CategoryAttribute.cs
- GeneratedCodeAttribute.cs
- NullRuntimeConfig.cs
- SqlDataSourceSummaryPanel.cs
- XamlStyleSerializer.cs
- DataSet.cs
- RtType.cs
- XmlLanguageConverter.cs
- CatalogZoneBase.cs
- HelpPage.cs
- RegexWriter.cs
- GcSettings.cs
- PropertyValue.cs
- WebPartVerb.cs
- QuaternionAnimationBase.cs
- XsltOutput.cs
- ConfigsHelper.cs
- XPathMessageFilterElement.cs
- ConfigurationElementCollection.cs
- GridView.cs
- XmlDataDocument.cs
- PhysicalFontFamily.cs
- FixedPage.cs
- HtmlTextArea.cs
- XmlAttributeCache.cs
- DynamicDocumentPaginator.cs
- UInt32.cs
- EventLogSession.cs
- XmlSchemaException.cs
- TableItemStyle.cs
- ToolStripCodeDomSerializer.cs
- RestHandlerFactory.cs
- RightsManagementPermission.cs
- InternalTypeHelper.cs
- QuadraticBezierSegment.cs
- RoutingChannelExtension.cs
- ManipulationDevice.cs
- KoreanLunisolarCalendar.cs
- SizeAnimationBase.cs
- ReadOnlyNameValueCollection.cs
- DoWorkEventArgs.cs
- ProxyManager.cs