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
- CompletionProxy.cs
- EffectiveValueEntry.cs
- XmlQueryType.cs
- DocumentGrid.cs
- SqlErrorCollection.cs
- FixedSOMPageConstructor.cs
- XmlCharType.cs
- RtfToXamlReader.cs
- ContentHostHelper.cs
- PropertyItemInternal.cs
- Misc.cs
- ControlBindingsCollection.cs
- ViewService.cs
- WebFormDesignerActionService.cs
- WebBrowser.cs
- ParallelLoopState.cs
- XmlSchemaComplexContent.cs
- BaseAddressPrefixFilterElementCollection.cs
- SafeNativeMethods.cs
- UxThemeWrapper.cs
- NullExtension.cs
- ItemList.cs
- SQLInt64Storage.cs
- Console.cs
- sqlmetadatafactory.cs
- OdbcConnectionFactory.cs
- Logging.cs
- SimpleLine.cs
- SplitContainer.cs
- Console.cs
- SelectionProcessor.cs
- ControlHelper.cs
- ExpressionEditorAttribute.cs
- EntitySqlQueryBuilder.cs
- Label.cs
- RuleInfoComparer.cs
- XpsException.cs
- login.cs
- SmtpReplyReaderFactory.cs
- IdentityValidationException.cs
- TypeSystem.cs
- RowToFieldTransformer.cs
- ClientApiGenerator.cs
- DefaultBinder.cs
- JsonSerializer.cs
- ApplicationInterop.cs
- PriorityQueue.cs
- HierarchicalDataBoundControlAdapter.cs
- DataStreams.cs
- AncillaryOps.cs
- DoubleCollectionConverter.cs
- CipherData.cs
- IdentityManager.cs
- TextServicesLoader.cs
- TreeView.cs
- XmlSequenceWriter.cs
- CacheDependency.cs
- SoapSchemaMember.cs
- IgnoreDataMemberAttribute.cs
- CanonicalFormWriter.cs
- OracleFactory.cs
- PriorityRange.cs
- ThreadPool.cs
- XPathSingletonIterator.cs
- TextBlockAutomationPeer.cs
- Underline.cs
- XslVisitor.cs
- OutputWindow.cs
- CalendarDataBindingHandler.cs
- DocumentViewerHelper.cs
- PersonalizationAdministration.cs
- BuildProvider.cs
- ConfigurationManagerInternalFactory.cs
- ItemCollection.cs
- RelatedImageListAttribute.cs
- Label.cs
- ContourSegment.cs
- ProtocolsConfiguration.cs
- listitem.cs
- Size.cs
- BinaryReader.cs
- EDesignUtil.cs
- Dictionary.cs
- WSDualHttpSecurityMode.cs
- IssuanceTokenProviderBase.cs
- Vector3DCollectionConverter.cs
- DependencyPropertyChangedEventArgs.cs
- XmlDesigner.cs
- PriorityBinding.cs
- Decimal.cs
- UserNamePasswordValidator.cs
- AbstractSvcMapFileLoader.cs
- RootDesignerSerializerAttribute.cs
- DeviceContext2.cs
- LongAverageAggregationOperator.cs
- BitmapImage.cs
- WindowsEditBoxRange.cs
- QuaternionIndependentAnimationStorage.cs
- SQLChars.cs
- FlowStep.cs