private async void AddDeviceBtn_Click(object sender, RoutedEventArgs e) { var dialog = new DeviceEditDialog(); await dialog.ShowAsync(); if (dialog.Device != null) { Devices.Add(dialog.Device); } UpdateStoredDevices(); }
private async void DeviceSettings_Click(object sender, RoutedEventArgs e) { var b = sender as Button; Device device = b.DataContext as Device; var dialog = new DeviceEditDialog { Device = device, IsEditMode = true }; await dialog.ShowAsync(); UpdateStoredDevices(); }