private void OnOpenStatisticWindow() { var vm = new StatisticWindowViewModel(CalcStatisticCommand) { Project = Project }; var window = new StatisticWindow { DataContext = vm }; window.ShowDialog(); }