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
- NullableLongAverageAggregationOperator.cs
- StagingAreaInputItem.cs
- ListItem.cs
- EventWaitHandleSecurity.cs
- PointCollectionConverter.cs
- ManipulationDevice.cs
- BooleanConverter.cs
- BindingOperations.cs
- TextureBrush.cs
- RectangleHotSpot.cs
- XsdDateTime.cs
- ECDiffieHellman.cs
- _CommandStream.cs
- EdgeModeValidation.cs
- _NestedMultipleAsyncResult.cs
- TextDecoration.cs
- SplineKeyFrames.cs
- FontEditor.cs
- TraceInternal.cs
- ScrollBar.cs
- TemplateBamlTreeBuilder.cs
- TextEditor.cs
- LocalBuilder.cs
- SemaphoreSecurity.cs
- StrongNameMembershipCondition.cs
- OdbcConnectionPoolProviderInfo.cs
- SchemaNames.cs
- GridViewAutoFormat.cs
- MimeBasePart.cs
- MarkupCompilePass1.cs
- Models.cs
- Collection.cs
- DisableDpiAwarenessAttribute.cs
- IgnoreSectionHandler.cs
- SvcMapFile.cs
- SafeEventLogWriteHandle.cs
- TranslateTransform3D.cs
- ExcludeFromCodeCoverageAttribute.cs
- KeyedHashAlgorithm.cs
- DispatcherObject.cs
- UniqueEventHelper.cs
- FixedSOMTable.cs
- validationstate.cs
- ProfessionalColorTable.cs
- safex509handles.cs
- DbSourceParameterCollection.cs
- D3DImage.cs
- XmlDesigner.cs
- MouseButtonEventArgs.cs
- WindowInteropHelper.cs
- GridViewColumnHeader.cs
- TextSelection.cs
- ListViewItemMouseHoverEvent.cs
- RtfNavigator.cs
- SqlGenericUtil.cs
- LongTypeConverter.cs
- FolderBrowserDialog.cs
- CommandID.cs
- ListItemCollection.cs
- ReferenceConverter.cs
- XmlSchemaSequence.cs
- CustomError.cs
- CTreeGenerator.cs
- odbcmetadatacollectionnames.cs
- NativeMethodsOther.cs
- httpstaticobjectscollection.cs
- TreeViewItemAutomationPeer.cs
- ContentType.cs
- LoaderAllocator.cs
- PageEventArgs.cs
- ValidatorCollection.cs
- GeometryDrawing.cs
- ChannelPoolSettingsElement.cs
- ConfigXmlWhitespace.cs
- SystemIcmpV6Statistics.cs
- PageThemeParser.cs
- ParseNumbers.cs
- ExpandCollapsePatternIdentifiers.cs
- ActiveXHost.cs
- HttpInputStream.cs
- Hashtable.cs
- PrintDocument.cs
- HttpException.cs
- _ListenerResponseStream.cs
- TextServicesDisplayAttribute.cs
- PeerCollaborationPermission.cs
- SettingsSection.cs
- RoleProviderPrincipal.cs
- PlanCompiler.cs
- PropertyGridView.cs
- WebConvert.cs
- TreeNodeStyleCollection.cs
- EventSinkHelperWriter.cs
- CheckPair.cs
- TrackingRecordPreFilter.cs
- TextTreeUndoUnit.cs
- _AcceptOverlappedAsyncResult.cs
- Int16AnimationUsingKeyFrames.cs
- UInt32.cs
- TraceXPathNavigator.cs