TestMatchTheElement.axaml.cs 748 B

12345678910111213141516171819202122232425262728
  1. using Avalonia;
  2. using Avalonia.Controls;
  3. using Avalonia.Controls.Shapes;
  4. using Avalonia.Markup.Xaml;
  5. using EntranseTesting.Models;
  6. using EntranseTesting.ViewModels;
  7. using System.Diagnostics;
  8. namespace EntranseTesting;
  9. public partial class TestMatchTheElement : UserControl
  10. {
  11. public TestMatchTheElement()
  12. {
  13. InitializeComponent();
  14. }
  15. private void OnPointerPressed(object? sender, Avalonia.Input.PointerPressedEventArgs e)
  16. {
  17. Debug.WriteLine("Pressed start");
  18. if (sender is not Border border) return;
  19. if (border.DataContext is not ElementOfGroup elem) return;
  20. if (DataContext is not MainWindowViewModel vm) return;
  21. vm.TestMain.TestPages.TestME.MatchLine(elem, ref border);
  22. }
  23. }