NamespaceDisplayAutomationPeer.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / View / NamespaceDisplayAutomationPeer.cs / 1305376 / NamespaceDisplayAutomationPeer.cs

                            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(); 
        }
    } 
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
´╗┐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(); 
        }
    } 
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK