public bool Show(int budgetId, out Budget budget) { budget = null; IBudgetDetailsViewModel viewModel = m_budgetDetailsViewModelFactory.Create(budgetId); var window = new BudgetDetailsWindow(viewModel); bool?result = window.ShowDialog(); if (result.HasValue && result.Value) { budget = viewModel.ToBudget(); return(true); } return(false); }
public BudgetDetailsWindow(IBudgetDetailsViewModel viewModel) { InitializeComponent(); DataContext = viewModel; }