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
- DrawingCollection.cs
- SqlFunctions.cs
- DataGridColumnHeader.cs
- PageThemeBuildProvider.cs
- ValidatedControlConverter.cs
- XamlClipboardData.cs
- SByteConverter.cs
- CommonProperties.cs
- DynamicPropertyReader.cs
- CodeCompiler.cs
- DynamicScriptObject.cs
- FrameSecurityDescriptor.cs
- Transform.cs
- TriggerCollection.cs
- InternalBase.cs
- SecureEnvironment.cs
- CryptoKeySecurity.cs
- FindCriteria11.cs
- panel.cs
- DeploymentSection.cs
- SqlDataSourceQueryConverter.cs
- CanonicalFontFamilyReference.cs
- ConnectionManagementElement.cs
- SessionSwitchEventArgs.cs
- EncryptedPackage.cs
- CompiledAction.cs
- ModelPerspective.cs
- SqlConnectionPoolProviderInfo.cs
- CatalogZoneBase.cs
- Completion.cs
- SecureEnvironment.cs
- GPStream.cs
- InstancePersistenceCommand.cs
- bindurihelper.cs
- HttpRuntime.cs
- RelationshipNavigation.cs
- InternalPermissions.cs
- TextComposition.cs
- TypeNameConverter.cs
- JoinGraph.cs
- ConnectionStringsExpressionEditor.cs
- DbParameterCollectionHelper.cs
- CqlBlock.cs
- PrintEvent.cs
- latinshape.cs
- TreeNodeCollection.cs
- EventDescriptor.cs
- FormView.cs
- KeyboardEventArgs.cs
- DiagnosticsConfigurationHandler.cs
- XPathNodeIterator.cs
- EntityDataSourceValidationException.cs
- SettingsPropertyWrongTypeException.cs
- XmlUnspecifiedAttribute.cs
- BufferBuilder.cs
- ExtensionDataObject.cs
- IItemContainerGenerator.cs
- MembershipUser.cs
- FileDialogCustomPlacesCollection.cs
- translator.cs
- MutexSecurity.cs
- KeyTime.cs
- ToolStripDropDownMenu.cs
- DataTableExtensions.cs
- IconBitmapDecoder.cs
- FontTypeConverter.cs
- Line.cs
- Root.cs
- WebPartVerbCollection.cs
- SymbolMethod.cs
- DecoderBestFitFallback.cs
- PackagePart.cs
- ObjectTypeMapping.cs
- InputLanguageCollection.cs
- httpserverutility.cs
- HttpServerVarsCollection.cs
- AttachmentService.cs
- CheckedListBox.cs
- Bold.cs
- input.cs
- DataGridCellEditEndingEventArgs.cs
- OneWayChannelListener.cs
- PrintPreviewControl.cs
- TableRowCollection.cs
- BlurEffect.cs
- CallContext.cs
- XmlSchemaInfo.cs
- TdsParser.cs
- SystemDiagnosticsSection.cs
- XmlCharacterData.cs
- BinaryFormatterWriter.cs
- ForeignKeyConstraint.cs
- ProjectionPruner.cs
- WebEncodingValidatorAttribute.cs
- Security.cs
- SafeHandle.cs
- NetworkInformationPermission.cs
- DataGridLinkButton.cs
- StreamWithDictionary.cs
- DetailsViewUpdatedEventArgs.cs