用户列表页面完成 订单列表页面开始 10%

This commit is contained in:
wule committed 2026-06-19 16:56:02 +08:00
1 parent 25cdf642bf
commit edc7913637
52 files changed
+2032 -365

No files matched your search

+39
View File
@@ -21,6 +21,45 @@ namespace _29WxOrderWpf.BaseWindows
WindowChrome.SetWindowChrome(this, new WindowChrome() { CaptionHeight = 8, ResizeBorderThickness = new Thickness(4), });
this.DataContext = this;
this.Loaded += BaseWindow_Loaded;
SizeChanged += BaseWindow_SizeChanged;
}
private void BaseWindow_SizeChanged(object sender, SizeChangedEventArgs e)
{
if (WindowState == WindowState.Maximized)
{
//// 获取当前屏幕的工作区(排除任务栏)
//var workArea = SystemParameters.WorkArea;
//// 设置窗口位置和大小
//this.Left = workArea.Left;
//this.Top = workArea.Top;
//this.Width = workArea.Width;
//this.Height = workArea.Height;
this.Padding = new Thickness(6);
}
else
this.Padding = new Thickness(0);
}
private void BaseWindow_Loaded(object sender, RoutedEventArgs e)
{
if (SystemParameters.PrimaryScreenWidth < this.Width + 0)
this.Width = SystemParameters.PrimaryScreenWidth - 0;
if (SystemParameters.WorkArea.Height < this.Height + 0)
this.Height = SystemParameters.WorkArea.Height - 0;
this.MaxHeight = SystemParameters.WorkArea.Height + 14;
//this.MaxWidth = SystemParameters.WorkArea.Width + 13;
double screenWidth = SystemParameters.PrimaryScreenWidth;
double screenHeight = SystemParameters.WorkArea.Height;
double windowWidth = this.ActualWidth;
double windowHeight = this.ActualHeight;
this.Left = (screenWidth / 2) - (windowWidth / 2);
this.Top = (screenHeight / 2) - (windowHeight / 2);
}
}
}