I have to click button, that save changes and close window.
public BaseCommand SaveCommand => saveCommand ?? (saveCommand = new BaseCommand(SaveMetod, SaveCanMetod));
private bool SaveCanMetod() => IsSelectedCamera && (SelectedCamera.Height != CameraHeight || SelectedCamera.Width != CameraWidth);
private void SaveMetod()
{
if (SaveCanMetod())
{
SelectedCamera.Width = CameraWidth.Value;
SelectedCamera.Height = CameraHeight.Value;
//Application.Current.MainWindow.Close();
}
}
The string "Application.Current.MainWindow.Close();" don't work when I start my application on revit.