/// <summary> /// Initializes a new instance of the <see cref="ExcludedDirectoriesWindow"/> class. /// </summary> /// <param name="viewModel">The view model to inject.</param> /// <remarks> /// This constructor can be used to use view-model injection. /// </remarks> public ExcludedDirectoriesWindow(ExcludedDirectoriesViewModel viewModel) { _viewModel = viewModel; DataContext = _viewModel; InitializeComponent(); //this.Buttons = new Button[] { this.OkButton, this.CancelButton }; }