EinmaleinsTrainer/Views/QuizView.xaml.cs
Naoriel Sa' Rocí 4a4fb54143 Added first code.
Signed-off-by: Naoriel Sa' Rocí <naoriel@sa-roci.de>
2026-03-30 02:26:31 +02:00

26 lines
602 B
C#

using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.Threading;
namespace EinmaleinsTrainer.Views;
public partial class QuizView : UserControl
{
public QuizView()
{
InitializeComponent();
this.AttachedToVisualTree += async (_,_) =>
{
await Dispatcher.UIThread.InvokeAsync(() => { }, DispatcherPriority.Background);
var tb = this.FindControl<TextBox>("AnswerTextBox");
tb?.Focus();
};
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}