feat(ui): complete Avalonia UI port with 7 main pages, tool settings & top MenuBar
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using ClawdDotNet.Desktop.ViewModels;
|
||||
|
||||
namespace ClawdDotNet.Desktop.Views;
|
||||
|
||||
public partial class InstancePickerWindow : Window
|
||||
{
|
||||
public InstancePickerWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Doppelklick auf eine Zeile startet — wie in der WinForms-Fassung. Das laesst
|
||||
// sich nicht sinnvoll als Befehl binden, weil DataGrid kein DoubleTapped je
|
||||
// Zeile anbietet; deshalb hier und nicht im Ansichtsmodell.
|
||||
AddHandler(DoubleTappedEvent, OnDoubleTapped, handledEventsToo: false);
|
||||
}
|
||||
|
||||
private void OnDoubleTapped(object? sender, TappedEventArgs e)
|
||||
{
|
||||
if (DataContext is InstancePickerViewModel vm && vm.StartCommand.CanExecute(null))
|
||||
vm.StartCommand.Execute(null);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user