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
- BitStream.cs
- Win32.cs
- Track.cs
- EditorBrowsableAttribute.cs
- RecognitionEventArgs.cs
- StandardBindingCollectionElement.cs
- RegexCompiler.cs
- Registry.cs
- DataGridToolTip.cs
- XmlConverter.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- HScrollBar.cs
- _UriTypeConverter.cs
- BinaryWriter.cs
- SqlCommand.cs
- WebControlAdapter.cs
- MessageHeaderException.cs
- DockPatternIdentifiers.cs
- GridViewColumnHeaderAutomationPeer.cs
- FloaterBaseParagraph.cs
- SourceCollection.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- ToolStripSettings.cs
- JumpPath.cs
- MoveSizeWinEventHandler.cs
- NumericUpDownAccelerationCollection.cs
- ContainerParagraph.cs
- Rfc2898DeriveBytes.cs
- ParallelTimeline.cs
- CryptoApi.cs
- AllMembershipCondition.cs
- NavigationService.cs
- XmlHierarchicalDataSourceView.cs
- GlyphRunDrawing.cs
- versioninfo.cs
- CodeAttributeArgumentCollection.cs
- RecognizeCompletedEventArgs.cs
- DelimitedListTraceListener.cs
- WebPartEditorOkVerb.cs
- QuadraticBezierSegment.cs
- TypeHelpers.cs
- FaultDesigner.cs
- StateInitializationDesigner.cs
- XmlWellformedWriter.cs
- Formatter.cs
- SchemaAttDef.cs
- DeploymentExceptionMapper.cs
- ErrorActivity.cs
- RuntimeArgumentHandle.cs
- SQLByteStorage.cs
- XmlSchemaElement.cs
- EnumerableRowCollection.cs
- DataGridViewIntLinkedList.cs
- FlowDocument.cs
- JobStaple.cs
- InputProcessorProfilesLoader.cs
- RelatedView.cs
- RoutedCommand.cs
- RotateTransform3D.cs
- TableAdapterManagerHelper.cs
- ManipulationDevice.cs
- XmlNodeComparer.cs
- TextWriterTraceListener.cs
- complextypematerializer.cs
- KeyBinding.cs
- DesignerForm.cs
- TextPattern.cs
- ObjectDataSourceFilteringEventArgs.cs
- IsolatedStorage.cs
- CodeSpit.cs
- XmlQueryOutput.cs
- FormViewCommandEventArgs.cs
- CmsInterop.cs
- ErrorInfoXmlDocument.cs
- Marshal.cs
- AnnotationResourceCollection.cs
- HttpProfileBase.cs
- TextElementCollectionHelper.cs
- XslNumber.cs
- ContractListAdapter.cs
- SerializerWriterEventHandlers.cs
- FilteredReadOnlyMetadataCollection.cs
- TextEditorContextMenu.cs
- Pen.cs
- TabControl.cs
- UnmanagedMemoryAccessor.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- CodeStatement.cs
- Matrix.cs
- AnimationException.cs
- cache.cs
- ControlAdapter.cs
- TextTreeExtractElementUndoUnit.cs
- ScopelessEnumAttribute.cs
- ByteStack.cs
- ViewValidator.cs
- GestureRecognitionResult.cs
- RegexWriter.cs
- MimeBasePart.cs
- EdmComplexPropertyAttribute.cs