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
- _RequestCacheProtocol.cs
- Point4D.cs
- InProcStateClientManager.cs
- LiteralTextParser.cs
- EventProvider.cs
- ReferenceConverter.cs
- HtmlImage.cs
- LocatorBase.cs
- BooleanExpr.cs
- MobileListItem.cs
- XmlName.cs
- ToolStrip.cs
- ObfuscationAttribute.cs
- XmlStreamNodeWriter.cs
- BitmapEffectRenderDataResource.cs
- CellParagraph.cs
- CdpEqualityComparer.cs
- Int32CollectionValueSerializer.cs
- InvokeHandlers.cs
- UpdateProgress.cs
- FixedPosition.cs
- IteratorDescriptor.cs
- RemotingAttributes.cs
- SchemeSettingElement.cs
- EdmToObjectNamespaceMap.cs
- UnsafeNativeMethods.cs
- SecurityDescriptor.cs
- UserValidatedEventArgs.cs
- Point3DConverter.cs
- Stack.cs
- OdbcConnectionHandle.cs
- ColumnWidthChangedEvent.cs
- IPipelineRuntime.cs
- ToolStripDropDownMenu.cs
- XmlSyndicationContent.cs
- ToolStripDropDown.cs
- DesignerTransaction.cs
- ContractDescription.cs
- BitmapEffectInput.cs
- ScrollableControl.cs
- FuncCompletionCallbackWrapper.cs
- Brush.cs
- PriorityQueue.cs
- DataTableReaderListener.cs
- Switch.cs
- FocusChangedEventArgs.cs
- GB18030Encoding.cs
- WindowsScrollBarBits.cs
- GridPattern.cs
- RequiredFieldValidator.cs
- RetriableClipboard.cs
- BufferModesCollection.cs
- Unit.cs
- DefaultSerializationProviderAttribute.cs
- PathSegment.cs
- EditingMode.cs
- StoreContentChangedEventArgs.cs
- RepeatInfo.cs
- DataColumnMappingCollection.cs
- BamlBinaryReader.cs
- ListenerChannelContext.cs
- FacetChecker.cs
- ProjectedSlot.cs
- CompressEmulationStream.cs
- DataColumnMappingCollection.cs
- Compiler.cs
- Identifier.cs
- ConstraintEnumerator.cs
- ContractCodeDomInfo.cs
- PropertyAccessVisitor.cs
- GeneralTransform3DTo2DTo3D.cs
- XsltInput.cs
- RegistryDataKey.cs
- Pkcs9Attribute.cs
- GridItemPattern.cs
- CustomErrorsSectionWrapper.cs
- MD5HashHelper.cs
- DrawingImage.cs
- ServiceReference.cs
- ReaderOutput.cs
- CodeIdentifiers.cs
- StructuralObject.cs
- DefaultValueTypeConverter.cs
- FormatVersion.cs
- GridView.cs
- CuspData.cs
- Misc.cs
- ResourcePermissionBaseEntry.cs
- CompositeScriptReferenceEventArgs.cs
- SimpleRecyclingCache.cs
- XsdDateTime.cs
- IISUnsafeMethods.cs
- HttpProfileBase.cs
- ObjectAnimationUsingKeyFrames.cs
- HttpGetProtocolImporter.cs
- XmlSchemaSet.cs
- CatchBlock.cs
- FakeModelPropertyImpl.cs
- ScrollProperties.cs
- ResourceContainer.cs