Files
DMS/DMS.WPF/Views/Dialogs/TriggerDialog.xaml.cs

36 lines
1.1 KiB
C#
Raw Permalink Normal View History

2025-09-14 19:13:40 +08:00
using System.Windows.Controls;
using System.Windows.Input;
2025-09-14 19:13:40 +08:00
using DMS.WPF.Helper;
using DMS.WPF.ItemViewModel;
2025-09-14 19:13:40 +08:00
using iNKORE.UI.WPF.Modern.Controls;
namespace DMS.WPF.Views.Dialogs
{
/// <summary>
/// TriggerDialog.xaml 的交互逻辑
/// </summary>
public partial class TriggerDialog : ContentDialog
{
private const int ContentAreaMaxWidth = 1000;
private const int ContentAreaMaxHeight = 800;
public TriggerDialog()
{
InitializeComponent();
this.Opened += OnOpened;
}
private void OnOpened(ContentDialog sender, ContentDialogOpenedEventArgs args)
{
// 修改对话框内容的最大宽度和最大高度
var backgroundElementBorder = VisualTreeFinder.FindVisualChildByName<Border>(this, "BackgroundElement");
if (backgroundElementBorder != null)
{
backgroundElementBorder.MaxWidth = ContentAreaMaxWidth;
backgroundElementBorder.MaxHeight = ContentAreaMaxHeight;
}
}
2025-09-14 19:13:40 +08:00
}
}