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
- IndicFontClient.cs
- WebPartManagerInternals.cs
- WeakRefEnumerator.cs
- ConfigurationValue.cs
- StructuredProperty.cs
- X509RecipientCertificateServiceElement.cs
- SqlWriter.cs
- MouseActionValueSerializer.cs
- DataGrid.cs
- HtmlElementEventArgs.cs
- PageAsyncTask.cs
- Schema.cs
- SeverityFilter.cs
- DependencyPropertyChangedEventArgs.cs
- LambdaCompiler.Generated.cs
- OdbcCommand.cs
- XmlHierarchyData.cs
- DataServiceKeyAttribute.cs
- TypeDescriptor.cs
- WSSecurityPolicy.cs
- Menu.cs
- SqlDataSourceQueryEditorForm.cs
- CustomCategoryAttribute.cs
- ThreadExceptionDialog.cs
- OpacityConverter.cs
- NameGenerator.cs
- Int32CAMarshaler.cs
- DefaultValueTypeConverter.cs
- GeneralTransform.cs
- PagesSection.cs
- XmlQueryTypeFactory.cs
- ProtocolsConfigurationHandler.cs
- ActiveXSite.cs
- EmitterCache.cs
- COMException.cs
- ListViewItemMouseHoverEvent.cs
- SynchronizedPool.cs
- CounterCreationDataCollection.cs
- SaveFileDialog.cs
- MissingMemberException.cs
- XmlDocumentFragment.cs
- OleDbFactory.cs
- NonValidatingSecurityTokenAuthenticator.cs
- StateMachineWorkflow.cs
- SQLConvert.cs
- XmlUtf8RawTextWriter.cs
- LoginViewDesigner.cs
- WebPart.cs
- SizeConverter.cs
- Main.cs
- LocalizableAttribute.cs
- Random.cs
- HatchBrush.cs
- ColorPalette.cs
- FunctionParameter.cs
- ReadOnlyActivityGlyph.cs
- ComplexPropertyEntry.cs
- TextRange.cs
- SingleResultAttribute.cs
- X509Certificate2.cs
- webclient.cs
- ContextDataSourceView.cs
- ObjectAnimationUsingKeyFrames.cs
- ReferenceConverter.cs
- HtmlMeta.cs
- PeerCollaborationPermission.cs
- CharacterBufferReference.cs
- Delegate.cs
- OdbcDataAdapter.cs
- WmlLiteralTextAdapter.cs
- LocatorPart.cs
- BooleanFunctions.cs
- TransformationRules.cs
- GetParentChain.cs
- NetworkStream.cs
- ChildDocumentBlock.cs
- DateTimeFormatInfoScanner.cs
- MethodSet.cs
- PrincipalPermission.cs
- RepeatInfo.cs
- SqlDataSourceStatusEventArgs.cs
- QuaternionRotation3D.cs
- UserControlBuildProvider.cs
- HostProtectionPermission.cs
- MaterialGroup.cs
- JsonEnumDataContract.cs
- WorkflowWebService.cs
- PropertyKey.cs
- SubstitutionList.cs
- ToolTipService.cs
- EntityDataSourceView.cs
- EditableTreeList.cs
- InternalPermissions.cs
- CodeTypeOfExpression.cs
- ParameterBuilder.cs
- TextServicesCompartmentEventSink.cs
- EnumerableCollectionView.cs
- TraceSwitch.cs
- ColorEditor.cs
- ScriptResourceHandler.cs