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
- CompileLiteralTextParser.cs
- StyleHelper.cs
- TextEditorSpelling.cs
- FaultDesigner.cs
- RSAPKCS1SignatureDeformatter.cs
- AnnotationStore.cs
- CharacterShapingProperties.cs
- DeflateInput.cs
- TrackingSection.cs
- ProcessManager.cs
- TemplatePagerField.cs
- AlternationConverter.cs
- SQLBytes.cs
- DataTransferEventArgs.cs
- TemplateControl.cs
- PropertySegmentSerializer.cs
- Cursor.cs
- FontResourceCache.cs
- DecimalAnimation.cs
- SqlDataSourceDesigner.cs
- WebGetAttribute.cs
- Zone.cs
- XmlSchemaImport.cs
- __ComObject.cs
- MarkupProperty.cs
- WindowsFormsSectionHandler.cs
- PackageRelationship.cs
- RewritingPass.cs
- SqlBooleanizer.cs
- NCryptNative.cs
- TextDecorationLocationValidation.cs
- IncrementalReadDecoders.cs
- WebBrowser.cs
- TemplatedEditableDesignerRegion.cs
- WebSysDescriptionAttribute.cs
- StylusPointProperties.cs
- TextElementEnumerator.cs
- OdbcStatementHandle.cs
- InteropAutomationProvider.cs
- DaylightTime.cs
- XpsFilter.cs
- WebConfigurationHostFileChange.cs
- SqlEnums.cs
- ViewKeyConstraint.cs
- RijndaelCryptoServiceProvider.cs
- WebControlAdapter.cs
- PropertyValueChangedEvent.cs
- FunctionNode.cs
- RandomNumberGenerator.cs
- HostedBindingBehavior.cs
- StaticSiteMapProvider.cs
- PropertyTabAttribute.cs
- WizardPanel.cs
- DbConnectionInternal.cs
- EmptyEnumerator.cs
- XmlObjectSerializer.cs
- FormViewRow.cs
- ViewBox.cs
- BidPrivateBase.cs
- SmtpTransport.cs
- FusionWrap.cs
- AdapterUtil.cs
- EllipseGeometry.cs
- TreeViewEvent.cs
- ConnectionPoint.cs
- StreamUpdate.cs
- QilTernary.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- FixedElement.cs
- Matrix.cs
- arclist.cs
- OptimizerPatterns.cs
- GridItem.cs
- RenderOptions.cs
- PagerSettings.cs
- Page.cs
- RegexMatch.cs
- FontFamilyValueSerializer.cs
- MouseGesture.cs
- typedescriptorpermissionattribute.cs
- PartEditor.cs
- CompiledELinqQueryState.cs
- entityreference_tresulttype.cs
- Relationship.cs
- ActivityTypeDesigner.xaml.cs
- SerialErrors.cs
- AddressingProperty.cs
- ThreadExceptionDialog.cs
- XmlRawWriter.cs
- DataObjectSettingDataEventArgs.cs
- IntranetCredentialPolicy.cs
- Set.cs
- SqlExpressionNullability.cs
- TypeResolver.cs
- DiscriminatorMap.cs
- TraversalRequest.cs
- ListMarkerSourceInfo.cs
- FileChangeNotifier.cs
- LeaseManager.cs
- ResourceDisplayNameAttribute.cs