修改了Dialog的调用方式,和实现了添加设备添加到侧边菜单中
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
Title="{Binding Title}"
|
||||
CloseButtonText="取消"
|
||||
DefaultButton="Primary"
|
||||
PrimaryButtonCommand="{Binding AddDeviceCommand}"
|
||||
PrimaryButtonText="添加"
|
||||
|
||||
d:DataContext="{d:DesignInstance vmd:DeviceDialogViewModel}"
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
using System.Windows;
|
||||
using iNKORE.UI.WPF.Modern.Controls;
|
||||
using PMSWPF.Models;
|
||||
using PMSWPF.ViewModels.Dialogs;
|
||||
|
||||
namespace PMSWPF.Views.Dialogs;
|
||||
|
||||
public partial class DeviceDialog
|
||||
{
|
||||
public DeviceDialog(DeviceDialogViewModel viewModel)
|
||||
public DeviceDialog(Device device)
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = viewModel;
|
||||
DataContext = new DeviceDialogViewModel(device);
|
||||
}
|
||||
|
||||
private void OnPrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
|
||||
|
||||
Reference in New Issue
Block a user