增加
This commit is contained in:
1 parent
993a91a545
commit
f772c35ede
27 files changed
+2585
-440
No files matched your search
@@ -0,0 +1,57 @@
|
||||
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 Main.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// MainHeaderImageContent.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class MainHeaderImageContent : UserControl
|
||||
{
|
||||
public MainHeaderImageContent()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private void IndicatorItem_PreviewMouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
e.Handled = true;
|
||||
TryDragMove();
|
||||
}
|
||||
|
||||
private void TimeItem_PreviewMouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
e.Handled = true;
|
||||
TryDragMove();
|
||||
}
|
||||
|
||||
private void TryDragMove()
|
||||
{
|
||||
Window window = Application.Current?.MainWindow;
|
||||
if (window is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
//if (window.WindowState == WindowState.Maximized)
|
||||
//{
|
||||
// window.WindowState = WindowState.Normal;
|
||||
//}
|
||||
window.DragMove();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user