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
- MeasurementDCInfo.cs
- DbTransaction.cs
- DeviceContext.cs
- LicenseContext.cs
- PeerCollaboration.cs
- UnsafeNativeMethods.cs
- SafeMarshalContext.cs
- HostingPreferredMapPath.cs
- PathFigureCollection.cs
- ObjRef.cs
- SimpleMailWebEventProvider.cs
- SchemaTypeEmitter.cs
- WebDisplayNameAttribute.cs
- SerialReceived.cs
- TextLine.cs
- DataBindingExpressionBuilder.cs
- DataControlImageButton.cs
- SqlGenericUtil.cs
- SqlDataSourceCache.cs
- EventArgs.cs
- HttpCapabilitiesSectionHandler.cs
- OrderedDictionary.cs
- RuntimeConfig.cs
- Matrix.cs
- VsPropertyGrid.cs
- XmlSchemaParticle.cs
- BorderGapMaskConverter.cs
- MimeFormImporter.cs
- RowParagraph.cs
- EpmSyndicationContentDeSerializer.cs
- XmlHierarchicalDataSourceView.cs
- VisualTarget.cs
- OutputScope.cs
- RoleService.cs
- XmlTextReaderImplHelpers.cs
- PolyQuadraticBezierSegment.cs
- X509Certificate2.cs
- ProfileModule.cs
- HtmlElement.cs
- RecordBuilder.cs
- BlurEffect.cs
- GridItemPattern.cs
- ConfigsHelper.cs
- Ray3DHitTestResult.cs
- _Events.cs
- FileLogRecordStream.cs
- TimeSpanOrInfiniteConverter.cs
- KeyFrames.cs
- InkCanvas.cs
- InheritanceContextChangedEventManager.cs
- WebScriptMetadataFormatter.cs
- SystemParameters.cs
- Point.cs
- InfoCardTrace.cs
- WasHttpModulesInstallComponent.cs
- TypeInfo.cs
- DataBoundControl.cs
- Int16AnimationUsingKeyFrames.cs
- InputManager.cs
- SqlMultiplexer.cs
- OperationResponse.cs
- BamlRecords.cs
- CurrentChangedEventManager.cs
- ConfigXmlReader.cs
- AxImporter.cs
- TabControlToolboxItem.cs
- QilTypeChecker.cs
- WizardForm.cs
- ProcessModelInfo.cs
- StateItem.cs
- CodeCompileUnit.cs
- ServiceContractDetailViewControl.cs
- PassportAuthentication.cs
- SafeReadContext.cs
- StylusPointPropertyId.cs
- GridPatternIdentifiers.cs
- ConfigXmlWhitespace.cs
- Effect.cs
- DuplicateWaitObjectException.cs
- TableAdapterManagerHelper.cs
- ScriptingRoleServiceSection.cs
- SystemUnicastIPAddressInformation.cs
- EmptyCollection.cs
- PropertyExpression.cs
- mongolianshape.cs
- EmptyImpersonationContext.cs
- FormViewUpdatedEventArgs.cs
- LightweightEntityWrapper.cs
- AuthorizationRuleCollection.cs
- DataGridHelper.cs
- DbProviderManifest.cs
- DoubleConverter.cs
- FieldNameLookup.cs
- FuncCompletionCallbackWrapper.cs
- UncommonField.cs
- NumberFunctions.cs
- TreeIterator.cs
- PasswordBoxAutomationPeer.cs
- SpStreamWrapper.cs
- LexicalChunk.cs