private void ItemOptionsCommandExecute(ItemCommandParameter parameter) { if (parameter != null) { var item = parameter.ItemSource as TranslationItem; spListBox.SelectedItem = item; OpenMenuOnTarget(parameter.ElementSource, parameter.ItemSource, false); } }
private void OnOptionsButtonClick(object sender, RoutedEventArgs e) { var itemCommandParameter = new ItemCommandParameter { ItemSource = DataContext, ElementSource = OptionsButton, Tag = "menu" }; if (OptionsCommand != null && OptionsCommand.CanExecute(itemCommandParameter)) OptionsCommand.Execute(itemCommandParameter); }
private void OnOptionsButtonClick(object sender, RoutedEventArgs e) { var itemCommandParameter = new ItemCommandParameter { ItemSource = DataContext, ElementSource = OptionsButton, Tag = "menu" }; if (OptionsCommand != null && OptionsCommand.CanExecute(itemCommandParameter)) { OptionsCommand.Execute(itemCommandParameter); } }
private void OnContentContainerMouseUp(object sender, MouseButtonEventArgs e) { if(e.ChangedButton != MouseButton.Left) return; var itemCommandParameter = new ItemCommandParameter { ItemSource = DataContext, ElementSource = ContentContainer, Tag = "content" }; if (Command != null && Command.CanExecute(itemCommandParameter)) Command.Execute(itemCommandParameter); }
private void ItemCommandExecute(ItemCommandParameter parameter) { if (_menu.IsOpen || _ignoreItemCommand) { _ignoreItemCommand = false; return; } if (parameter != null) { var item = parameter.ItemSource as TranslationItem; if (item != null && !string.IsNullOrEmpty(item.TextWithOverflow)) { ReplaceSnapshotSpanText(item.TextWithOverflow); } } }
private void OnContentContainerMouseUp(object sender, MouseButtonEventArgs e) { if (e.ChangedButton != MouseButton.Left) { return; } var itemCommandParameter = new ItemCommandParameter { ItemSource = DataContext, ElementSource = ContentContainer, Tag = "content" }; if (Command != null && Command.CanExecute(itemCommandParameter)) { Command.Execute(itemCommandParameter); } }
private void ItemOptionsCommandExecute(ItemCommandParameter parameter) { if (parameter != null) { var item = parameter.ItemSource as TranslationItem; spListBox.SelectedItem = item; OpenMenuOnTarget(parameter.ElementSource, parameter.ItemSource, false); } }
private void ItemCommandExecute(ItemCommandParameter parameter) { if (_menu.IsOpen || _ignoreItemCommand) { _ignoreItemCommand = false; return; } if (parameter != null) { var item = parameter.ItemSource as TranslationItem; if (item != null && !string.IsNullOrEmpty(item.TextWithOverflow)) ReplaceSnapshotSpanText(item.TextWithOverflow); } }