A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

32 lines
688 B

using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Markup.Xaml;
namespace ControlCatalog.Pages
{
public partial class CheckBoxPage : UserControl
{
private TextBlock myTb;
private int count;
public CheckBoxPage()
{
this.InitializeComponent();
myTb = this.FindControl<TextBlock>("myTb");
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
protected override void OnPointerMoved(PointerEventArgs e)
{
base.OnPointerMoved(e);
myTb.Text = e.GetPosition(this).ToString() + ", " + count++;
}
}
}