public MainWindow() { InitializeComponent(); DataContext = ViewModel = new SimulationViewModel() { CanvasSize = 500 }; }
public LocalizationWindow(SimulationViewModel viewModel) { InitializeComponent(); DataContext = viewModel; if (viewModel.WorldShape != null) { double size = viewModel.CanvasSize / viewModel.WorldShape[0]; AddLocalizationIndicators(viewModel.LocalizationIndicators, viewModel.WorldShape[0], viewModel.WorldShape[1], size); } }