12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- 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;
- using System.Windows.Threading;
- namespace PDF_Master.Views.PropertyPanel.ViewModular
- {
- /// <summary>
- /// ReadViewContent.xaml 的交互逻辑
- /// </summary>
- public partial class ReadViewContent : UserControl
- {
- public ReadViewContent()
- {
- InitializeComponent();
- }
- /// <summary>
- /// 鼠标移动到控件范围时显示控件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void RectangleReadMode_MouseEnter(object sender, MouseEventArgs e)
- {
- //Dispatcher.BeginInvoke(DispatcherPriority.Send, new Action(delegate
- //{
- if ((this.DataContext as ReadViewContentViewModel).ViewContentViewModel.mainViewModel.IsBookMode)
- {
- this.ReadModeContent.Visibility = Visibility.Visible;
- this.RectangleReadMode.Visibility = Visibility.Collapsed;
- }
- //}));
- }
- /// <summary>
- /// 鼠标移开页面控件,三秒后隐藏该控件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private async void ReadModeContent_MouseLeave(object sender, MouseEventArgs e)
- {
- await System.Threading.Tasks.Task.Delay(3000);
- //Thread.Sleep(3000);
- this.ReadModeContent.Visibility = Visibility.Collapsed;
- this.RectangleReadMode.Visibility = Visibility.Visible;
- }
- private void UserControl_KeyDown(object sender, KeyEventArgs e)
- {
- }
- }
- }
|