private void BtnMenuItem_OnClick(object sender, RoutedEventArgs e)
        {
            var editGeneralMenuSettingsViewModel = new GeneralMenuSettingsViewModel(GetMenuItemButton(sender, e));

            editGeneralMenuSettingsViewModel.MenuItemUpdated += async(_, __) => await MainWindowViewModel?.Reset();

            var editGeneralMenuSettingsView = new GeneralMenuSettingsView(GetMenuItemButton(sender, e))
            {
                DataContext = editGeneralMenuSettingsViewModel
            };

            Main.Content = editGeneralMenuSettingsView;
        }
Esempio n. 2
0
 public GeneralMenuSettingsView(MenuItemEntityModel menuItemEntityModel)
 {
     InitializeComponent();
     DataContextChanged += Reset;
     DataContext         = new GeneralMenuSettingsViewModel(menuItemEntityModel);
 }