Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / Automation / Peers / FrameworkContentElementAutomationPeer.cs / 1 / FrameworkContentElementAutomationPeer.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: FrameworkContentElementAutomationPeer.cs // // Description: AutomationPeer associated with FrameworkContnetElement. // //--------------------------------------------------------------------------- using System.Windows.Markup; // DefinitionProperties using System.Windows.Controls; // Label namespace System.Windows.Automation.Peers { ////// AutomationPeer associated with FrameworkContentElement. /// public class FrameworkContentElementAutomationPeer : ContentElementAutomationPeer { ////// Constructor. /// /// Owner of the AutomationPeer. public FrameworkContentElementAutomationPeer(FrameworkContentElement owner) : base(owner) { } ////// protected override string GetAutomationIdCore() { // 1. fetch AutomationProperties.AutomationIdProperty string result = base.GetAutomationIdCore(); if (string.IsNullOrEmpty(result)) { // 2. fetch x:Uid result = DefinitionProperties.GetUid(Owner); if (string.IsNullOrEmpty(result)) { // 3. fetch FrameworkElement.NameProperty result = ((FrameworkContentElement)Owner).Name; } } return result == null ? string.Empty : result; } /// protected override string GetHelpTextCore() { string result = base.GetHelpTextCore(); if (string.IsNullOrEmpty(result)) { object toolTip = ((FrameworkContentElement)Owner).ToolTip; if (toolTip != null) { result = toolTip as string; if (string.IsNullOrEmpty(result)) { FrameworkElement toolTipElement = toolTip as FrameworkElement; if (toolTipElement != null) result = toolTipElement.GetPlainText(); } } } return result ?? String.Empty; } /// override protected AutomationPeer GetLabeledByCore() { AutomationPeer labelPeer = base.GetLabeledByCore(); if (labelPeer == null) { Label label = Label.GetLabeledBy(Owner); if (label != null) return label.GetAutomationPeer(); } return null; } } } // 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
- SoapExtensionImporter.cs
- XsdSchemaFileEditor.cs
- ContextDataSourceContextData.cs
- XsltConvert.cs
- DateTimeParse.cs
- DropShadowEffect.cs
- Marshal.cs
- _LazyAsyncResult.cs
- TextTrailingCharacterEllipsis.cs
- XamlWriter.cs
- Int16KeyFrameCollection.cs
- SecurityMessageProperty.cs
- EventLogPermissionEntryCollection.cs
- ManifestSignatureInformation.cs
- PersonalizationStateInfo.cs
- XmlSchemaElement.cs
- ListItemConverter.cs
- Int32.cs
- BasicExpressionVisitor.cs
- IIS7WorkerRequest.cs
- StateRuntime.cs
- Wildcard.cs
- GenerateTemporaryTargetAssembly.cs
- RegexMatch.cs
- KeySplineConverter.cs
- ColorDialog.cs
- ResourceExpressionBuilder.cs
- Stacktrace.cs
- DataStorage.cs
- ListViewCancelEventArgs.cs
- ProfileProvider.cs
- NodeLabelEditEvent.cs
- ObsoleteAttribute.cs
- Vector3DAnimation.cs
- ParserStreamGeometryContext.cs
- Int32CAMarshaler.cs
- ToolbarAUtomationPeer.cs
- ListBindingConverter.cs
- TextElementEnumerator.cs
- Nullable.cs
- PictureBox.cs
- TableItemProviderWrapper.cs
- XmlSchemaAnnotated.cs
- FlowDocumentPageViewerAutomationPeer.cs
- Monitor.cs
- FileSystemEventArgs.cs
- ValidatingReaderNodeData.cs
- InputMethod.cs
- X509Utils.cs
- WebPartEditorApplyVerb.cs
- CollectionViewGroup.cs
- BinaryUtilClasses.cs
- Send.cs
- DataGridViewComboBoxCell.cs
- DateTimeOffset.cs
- DrawingImage.cs
- StorageRoot.cs
- MatchingStyle.cs
- HttpException.cs
- XmlSortKey.cs
- CompiledQueryCacheKey.cs
- Accessible.cs
- SqlVersion.cs
- HelloOperationAsyncResult.cs
- RefreshEventArgs.cs
- AutomationElementIdentifiers.cs
- EnumerableRowCollection.cs
- GroupQuery.cs
- SQLRoleProvider.cs
- Source.cs
- AppDomain.cs
- XmlDesigner.cs
- CollectionViewProxy.cs
- PermissionAttributes.cs
- ProfileServiceManager.cs
- SafeRegistryHandle.cs
- OutputCacheProviderCollection.cs
- _LocalDataStoreMgr.cs
- XmlSchemaValidationException.cs
- ToolStripContainerDesigner.cs
- ActiveXContainer.cs
- SlotInfo.cs
- controlskin.cs
- DefaultIfEmptyQueryOperator.cs
- ResolveNameEventArgs.cs
- DefaultExpressionVisitor.cs
- remotingproxy.cs
- SQLMoney.cs
- Label.cs
- SchemaDeclBase.cs
- AppSettingsReader.cs
- DecimalStorage.cs
- ImagingCache.cs
- CodeDelegateCreateExpression.cs
- AppDomainFactory.cs
- SimpleFieldTemplateUserControl.cs
- HttpConfigurationSystem.cs
- DocumentViewer.cs
- OdbcConnectionHandle.cs
- BatchWriter.cs