2025-08-23 20:52:23 +08:00
|
|
|
using DMS.WPF.Helper;
|
2025-08-23 16:01:30 +08:00
|
|
|
using DMS.WPF.ViewModels.Dialogs;
|
2025-08-23 20:52:23 +08:00
|
|
|
using iNKORE.UI.WPF.Modern.Controls;
|
|
|
|
|
using System.Windows.Controls;
|
2025-08-23 16:01:30 +08:00
|
|
|
|
|
|
|
|
namespace DMS.WPF.Views.Dialogs;
|
|
|
|
|
|
|
|
|
|
public partial class VariableDialog
|
|
|
|
|
{
|
2025-08-24 12:25:44 +08:00
|
|
|
private const int ContentAreaMaxWidth = 1200;
|
|
|
|
|
private const int ContentAreaMaxHeight = 900;
|
2025-08-23 16:01:30 +08:00
|
|
|
public VariableDialog()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2025-08-23 20:52:23 +08:00
|
|
|
this.Opened += OnOpened;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnOpened(ContentDialog sender, ContentDialogOpenedEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
var backgroundElementBorder = VisualTreeFinder.FindVisualChildByName<Border>(this, "BackgroundElement");
|
|
|
|
|
backgroundElementBorder.MaxWidth = ContentAreaMaxWidth;
|
|
|
|
|
backgroundElementBorder.MaxWidth = ContentAreaMaxHeight;
|
2025-08-23 16:01:30 +08:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|