// RibbonShowBackstageUICommand.cs
// Copyright (c) 2016 Bentley Systems, Incorporated. All Rights Reserved.

using Haestad.Support.Library;
using Haestad.Support.Support;
using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Input;
using System.Windows.Threading;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.RibbonView;

namespace Haestad.Framework.UI.Integration
{
    /// <summary>
    /// A headless UI command that specifes ALT+F as a hot key for switching to the backstage.
    /// </summary>
    internal class RibbonShowBackstageUICommand : RibbonHeadlessUICommandBase
    {
        #region Constructor
        internal RibbonShowBackstageUICommand(RadRibbonView ribbon) 
            : base (ribbon)
        {
        }
        #endregion

        #region Public Override Methods
        public override void Execute(object parameter)
        {
            if (!Ribbon.IsBackstageOpen)
                Ribbon.IsBackstageOpen = true;    
        }
        #endregion

        #region Protected Override Methods
        protected override RibbonHotKey NewHotKey()
        {
            return RibbonHotKey.AltF;
        }
        #endregion
    }
}
