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

# · C# · 25 lines · 22 code · 3 blank · 0 comment · 2 complexity · 927d3b1d34853533c609b27e25fea57d MD5 · raw file

  1. using System.Diagnostics.Contracts;
  2. using System.Windows.Automation.Peers;
  3. namespace Elysium.Theme.Controls.Automation
  4. {
  5. public class ApplicationBarAutomationPeer : FrameworkElementAutomationPeer
  6. {
  7. public ApplicationBarAutomationPeer(ApplicationBar owner)
  8. : base(owner)
  9. {
  10. }
  11. protected override string GetClassNameCore()
  12. {
  13. Contract.Ensures(Contract.Result<string>() == "ApplicationBar");
  14. return "ApplicationBar";
  15. }
  16. protected override AutomationControlType GetAutomationControlTypeCore()
  17. {
  18. Contract.Ensures(Contract.Result<AutomationControlType>() == AutomationControlType.Menu);
  19. return AutomationControlType.Menu;
  20. }
  21. }
  22. } ;