PageRenderTime 21ms CodeModel.GetById 18ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 0ms

/Source code/Theme/Controls/ApplicationBar/Automation/ApplicationBarAutomationPeer.cs

#
C# | 25 lines | 22 code | 3 blank | 0 comment | 2 complexity | 927d3b1d34853533c609b27e25fea57d MD5 | raw file
Possible License(s): Apache-2.0
 1using System.Diagnostics.Contracts;
 2using System.Windows.Automation.Peers;
 3
 4namespace Elysium.Theme.Controls.Automation
 5{
 6    public class ApplicationBarAutomationPeer : FrameworkElementAutomationPeer
 7    {
 8        public ApplicationBarAutomationPeer(ApplicationBar owner)
 9            : base(owner)
10        {
11        }
12
13        protected override string GetClassNameCore()
14        {
15            Contract.Ensures(Contract.Result<string>() == "ApplicationBar");
16            return "ApplicationBar";
17        }
18
19        protected override AutomationControlType GetAutomationControlTypeCore()
20        {
21            Contract.Ensures(Contract.Result<AutomationControlType>() == AutomationControlType.Menu);
22            return AutomationControlType.Menu;
23        }
24    }
25} ;