internal void ListBoxMenu_Opened(object sender, RoutedEventArgs e) { var items = ((ItemsControl)e.Source).ItemsSource; var deleteMenuItem = VcUtils.FindMenuItem(LocaleConstants.ACTION_REMOVEPROGRAM, items); if (deleteMenuItem != null) { deleteMenuItem.Enabled = SelectedItem != null; } }
public void Localize(string locale) { LabelAddText = LocalePlugin.GetString(LocaleConstants.LABEL_ADDITEMS); VcUtils.LocalizeMenu(ListMenu, locale); }