Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- HttpRawResponse.cs
- ParserContext.cs
- XMLSchema.cs
- ServiceModelSectionGroup.cs
- DBSchemaTable.cs
- OptionUsage.cs
- VirtualDirectoryMapping.cs
- BindingListCollectionView.cs
- TemplateAction.cs
- StringReader.cs
- IdleTimeoutMonitor.cs
- QueryReaderSettings.cs
- DbConnectionPoolIdentity.cs
- HelpProvider.cs
- XpsLiterals.cs
- ReferenceConverter.cs
- RecordConverter.cs
- ConfigurationException.cs
- FilterQueryOptionExpression.cs
- ChangeToolStripParentVerb.cs
- AssemblyHash.cs
- BindValidationContext.cs
- ImageAnimator.cs
- XpsImage.cs
- XmlResolver.cs
- ColumnWidthChangingEvent.cs
- IUnknownConstantAttribute.cs
- MappedMetaModel.cs
- ConditionCollection.cs
- GenerateHelper.cs
- AuthenticationService.cs
- WebPartHelpVerb.cs
- DataGridTextBox.cs
- TextTabProperties.cs
- SymbolType.cs
- CreateRefExpr.cs
- HttpPostClientProtocol.cs
- SqlCommandSet.cs
- GuidelineCollection.cs
- RijndaelManaged.cs
- EventDescriptor.cs
- COAUTHINFO.cs
- HttpDictionary.cs
- Compensation.cs
- XmlIgnoreAttribute.cs
- DPTypeDescriptorContext.cs
- CompoundFileStorageReference.cs
- DispatcherFrame.cs
- ExtensionDataReader.cs
- Button.cs
- ConstructorNeedsTagAttribute.cs
- BinaryMethodMessage.cs
- XNodeValidator.cs
- ToolStripItemDataObject.cs
- XPathNodePointer.cs
- QueryOptionExpression.cs
- XmlSchemaCollection.cs
- CompositeCollectionView.cs
- RightNameExpirationInfoPair.cs
- TextStore.cs
- EntityDataSourceSelectedEventArgs.cs
- DiscoveryDocument.cs
- WindowAutomationPeer.cs
- TemplatedAdorner.cs
- Stack.cs
- RowToFieldTransformer.cs
- TableCell.cs
- XmlSchemaCompilationSettings.cs
- ServiceBusyException.cs
- BaseAppDomainProtocolHandler.cs
- StrokeFIndices.cs
- SchemaConstraints.cs
- Console.cs
- DiscoveryReference.cs
- DynamicObjectAccessor.cs
- CollectionChangeEventArgs.cs
- VisualBasicSettingsHandler.cs
- InputProviderSite.cs
- UmAlQuraCalendar.cs
- DataGridAutomationPeer.cs
- DmlSqlGenerator.cs
- Walker.cs
- CellNormalizer.cs
- ClientProtocol.cs
- Rule.cs
- EditorBrowsableAttribute.cs
- AuthenticatingEventArgs.cs
- TypeElement.cs
- CssClassPropertyAttribute.cs
- TextEmbeddedObject.cs
- MailBnfHelper.cs
- ScriptControlDescriptor.cs
- IPEndPoint.cs
- ScriptModule.cs
- RecognizedPhrase.cs
- Convert.cs
- _NegoStream.cs
- Int32Rect.cs
- TextEffectResolver.cs
- DecimalAnimationBase.cs