public FastLinkWidget() { InitializeComponent(); ViewModel = new FastLinksVM(); /* * btnContainer.Children.Clear(); * * foreach (Button button in ViewModel.FastLinks) * btnContainer.Children.Add(button); * */ }
public bool?ShowDialog(FastLinksVM fastLinksVM) { ViewModel = fastLinksVM; bool?res = base.ShowDialog(); if (res.HasValue && res.Value) { // fastLinksVM.OnSelect("Dictionary"); fastLinksVM.UpdateFastLinks(); } return(res); }