using PDF_Office.CustomControl;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace PDF_Office.Views.Tools
{
    /// <summary>
    /// AnnotToolContent.xaml 的交互逻辑
    /// </summary>
    public partial class AnnotToolContent : UserControl
    {
        public AnnotToolContent()
        {
            InitializeComponent();
        }

        private void BtnHand_Click(object sender, RoutedEventArgs e)
        {

        }

        private void BtnTool_Click(object sender, RoutedEventArgs e)
        {
            CustomIconToggleBtn keepBtn = sender as CustomIconToggleBtn;

            if (keepBtn != null)
            {
                ClearSelectedToolPanel(keepBtn);
            }
        }

        private void ClearSelectedToolPanel(CustomIconToggleBtn keepBtn = null)
        {
            foreach (var item in ToolPanel.Children)
            {
                CustomIconToggleBtn checkBtn = item as CustomIconToggleBtn;
                if (checkBtn != null && checkBtn != keepBtn)
                {
                    checkBtn.IsChecked = false;
                }
            }
        }

        private void BtnBookMark_Click(object sender, RoutedEventArgs e)
        {

        }
    }
}
