using DMS.Helper;
using DMS.Services;
using DMS.WPF.Helper;
using DMS.WPF.ViewModels.Dialogs;
using DMS.WPF.ViewModels.Items;
using iNKORE.UI.WPF.Modern.Controls;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Threading;
namespace DMS.WPF.Views.Dialogs;
///
/// ImportOpcUaDialog.xaml 的交互逻辑
///
public partial class ImportOpcUaDialog : ContentDialog
{
private const int ContentAreaMaxWidth = 1200;
private const int ContentAreaMaxHeight = 800;
public ImportOpcUaDialog()
{
InitializeComponent();
this.Opened += OnOpened;
}
private void OnOpened(ContentDialog sender, ContentDialogOpenedEventArgs args)
{
//修改对话框内容的最大宽度和最大高度
var backgroundElementBorder = VisualTreeFinder.FindVisualChildByName(this, "BackgroundElement");
backgroundElementBorder.MaxWidth = ContentAreaMaxWidth;
backgroundElementBorder.MaxWidth = ContentAreaMaxHeight;
}
private async void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs