using PDF_Office.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_Office.Views.PropertyPanel.ViewModular
{
///
/// ReadViewContent.xaml 的交互逻辑
///
public partial class ReadViewContent : UserControl
{
public ReadViewContent()
{
InitializeComponent();
}
///
/// 鼠标移动到控件范围时显示控件
///
///
///
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;
}
//}));
}
///
/// 鼠标移开页面控件,三秒后隐藏该控件
///
///
///
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)
{
}
}
}