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
- BookmarkUndoUnit.cs
- XmlSchemaSimpleTypeRestriction.cs
- HttpPostedFile.cs
- EntityCommand.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- SmtpReplyReaderFactory.cs
- TextTreeTextBlock.cs
- PersonalizationProviderHelper.cs
- HitTestFilterBehavior.cs
- WebConvert.cs
- XmlNode.cs
- StateMachineHelpers.cs
- RemotingException.cs
- RelationalExpressions.cs
- LambdaCompiler.ControlFlow.cs
- FileDialog.cs
- TagPrefixAttribute.cs
- Baml2006KeyRecord.cs
- RenameRuleObjectDialog.cs
- PtsHost.cs
- ToolboxCategory.cs
- odbcmetadatacolumnnames.cs
- PluralizationServiceUtil.cs
- Invariant.cs
- NetDispatcherFaultException.cs
- CollectionMarkupSerializer.cs
- CheckPair.cs
- PathGeometry.cs
- SafeMemoryMappedViewHandle.cs
- CreateUserWizard.cs
- SqlWebEventProvider.cs
- ConstNode.cs
- TextEndOfLine.cs
- Matrix3DStack.cs
- IndexedString.cs
- HyperLinkDesigner.cs
- JumpList.cs
- BamlRecordWriter.cs
- DataColumnMapping.cs
- MarshalByValueComponent.cs
- TableRowCollection.cs
- MessageSecurityProtocolFactory.cs
- BrowserCapabilitiesCompiler.cs
- XmlILConstructAnalyzer.cs
- Membership.cs
- ScriptIgnoreAttribute.cs
- ConsoleCancelEventArgs.cs
- Module.cs
- AuditLevel.cs
- GatewayDefinition.cs
- MatrixTransform.cs
- FixedSchema.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- ChangeTracker.cs
- BaseDataList.cs
- XmlReflectionMember.cs
- EventManager.cs
- LabelTarget.cs
- ContractComponent.cs
- HttpDictionary.cs
- HMAC.cs
- NetMsmqBindingCollectionElement.cs
- Baml2006ReaderSettings.cs
- XPathBinder.cs
- RefExpr.cs
- HyperLink.cs
- QueueSurrogate.cs
- HttpApplicationFactory.cs
- PenContexts.cs
- UnsafeNativeMethods.cs
- EntryIndex.cs
- BindingContext.cs
- ButtonBase.cs
- PhysicalAddress.cs
- SatelliteContractVersionAttribute.cs
- DataMemberAttribute.cs
- AttachmentCollection.cs
- DocumentViewer.cs
- ExtensionDataReader.cs
- TempFiles.cs
- ServiceDescriptionReflector.cs
- AssociationSetEnd.cs
- DispatcherObject.cs
- WindowsAuthenticationEventArgs.cs
- XmlWrappingWriter.cs
- LoginUtil.cs
- Pair.cs
- Matrix3DValueSerializer.cs
- SourceInterpreter.cs
- TrackingMemoryStreamFactory.cs
- ConfigurationLocation.cs
- SettingsBase.cs
- TableLayoutRowStyleCollection.cs
- SafePipeHandle.cs
- dbdatarecord.cs
- ToolStripRenderer.cs
- Membership.cs
- HttpResponseBase.cs
- RightsManagementInformation.cs
- GridView.cs