/mcs/class/referencesource/System.Activities.Presentation/System.Activities.Presentation/System/Activities/Presentation/View/NamespaceDisplayAutomationPeer.cs
C# | 35 lines | 33 code | 2 blank | 0 comment | 2 complexity | 2941042e1c08d0188ff9c3b8472e282d MD5 | raw file
Possible License(s): GPL-2.0, CC-BY-SA-3.0, LGPL-2.0, MPL-2.0-no-copyleft-exception, LGPL-2.1, Unlicense, Apache-2.0
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows.Automation.Peers;
- using System.Windows;
- using System.Runtime.InteropServices;
- using System.Xml.Linq;
- using System.Globalization;
- using System.Runtime;
- namespace System.Activities.Presentation.View
- {
- [Fx.Tag.XamlVisible(false)]
- class NamespaceDisplayAutomationPeer : UIElementAutomationPeer
- {
- public NamespaceDisplayAutomationPeer(NamespaceDisplay owner)
- : base(owner)
- {
- }
- protected override string GetItemStatusCore()
- {
- NamespaceDisplay namespaceDisplay = this.Owner as NamespaceDisplay;
- if (namespaceDisplay != null)
- {
- XElement itemStatus = new XElement("NamespaceStatus",
- new XAttribute("Status", namespaceDisplay.IsInvalid ? "Invalid" : "Valid"),
- new XAttribute("ErrorMessage", namespaceDisplay.ErrorMessage));
- return itemStatus.ToString();
- }
- return base.GetItemStatusCore();
- }
- }
- }