using ComPDFKitViewer;
using PDF_Office.ViewModels;
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.PropertyPanel.ViewModular
{
    /// <summary>
    /// ViewModularContent.xaml 的交互逻辑
    /// </summary>
    public partial class ViewModularContent : UserControl
    {
        public ViewModularContent()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 阅读模式
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void RbtnReadMode_Click(object sender, RoutedEventArgs e)
        {
            RbtnReadMode.IsChecked = false;
            if (Window.GetWindow(this) is MainWindow window)
            {
                if (window.TabablzControl.SelectedItem is MainContent main)
                {
                    if (main.ContentMain.Content is ViewContent viewContent)
                    {
                        viewContent.RbtnReadMode_Click(sender, e);

                    }

                }
            }
        }
    }
}