12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- using ComPDFKitViewer;
- using PDF_Master.ViewModels;
- using PDF_Master.ViewModels.PropertyPanel.ViewModular;
- 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_Master.Views.PropertyPanel.ViewModular
- {
- /// <summary>
- /// ViewModularContent.xaml 的交互逻辑
- /// </summary>
- public partial class ViewModularContent : UserControl
- {
- private ViewModularContentViewModel viewModel = null;
- public ViewModularContent()
- {
- InitializeComponent();
- viewModel = this.DataContext as ViewModularContentViewModel;
- }
- /// <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(sender, e);
- ViewContentViewModel model = viewContent.DataContext as ViewContentViewModel;
- model.On_ReadMode();
- }
- }
- }
- }
- private void btnRotateRight_Click(object sender, RoutedEventArgs e)
- {
- //分屏视图,同步旋转
- //if (Window.GetWindow(this) is MainWindow window)
- //{
- // if (window.TabablzControl.SelectedItem is MainContent main)
- // {
- // if (main.ContentMain.Content is ViewContent viewContent)
- // {
- // foreach (var item in viewContent.GridViewer.Children)
- // {
- // if (item is ContentControl control)
- // {
- // if (control.Content is SplitScreenContent splitScreenContent)
- // {
- // if (splitScreenContent.PDFViewerContent.Content != null)
- // {
- // viewModel.SplitScreenPDFViewer = (ComPDFKitViewer.PdfViewer.CPDFViewer)splitScreenContent.PDFViewerContent.Content;
- // break;
- // }
- // }
- // }
- // }
- // }
- // }
- //}
- viewModel.RotateCommand.Execute((sender as Button).Tag.ToString());
- }
- }
- }
|