Generic.cs 696 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Input;
  9. namespace InABox.DynamicGrid
  10. {
  11. public partial class Generic : ResourceDictionary
  12. {
  13. public Generic()
  14. {
  15. //InitializeComponent();
  16. }
  17. private void Panel_OnPreviewMouseRightButtonUp(object sender, MouseButtonEventArgs e)
  18. {
  19. var parent = (sender as FrameworkElement)?.TemplatedParent as DynamicTabItem;
  20. if (parent == null)
  21. return;
  22. parent.ContextMenuCommand.Execute(null);
  23. }
  24. }
  25. }