mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
35 lines
829 B
C#
35 lines
829 B
C#
|
|
using Avalonia.Controls;
|
||
|
|
using Avalonia.Input;
|
||
|
|
using Avalonia.Markup.Xaml;
|
||
|
|
|
||
|
|
namespace Flow.Launcher.Avalonia.Views;
|
||
|
|
|
||
|
|
public partial class ResultListBox : UserControl
|
||
|
|
{
|
||
|
|
private ListBox? _listBox;
|
||
|
|
|
||
|
|
public ResultListBox()
|
||
|
|
{
|
||
|
|
InitializeComponent();
|
||
|
|
_listBox = this.FindControl<ListBox>("ResultsList");
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InitializeComponent()
|
||
|
|
{
|
||
|
|
AvaloniaXamlLoader.Load(this);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void OnPointerPressed(PointerPressedEventArgs e)
|
||
|
|
{
|
||
|
|
base.OnPointerPressed(e);
|
||
|
|
|
||
|
|
// Handle left click on result item
|
||
|
|
var point = e.GetCurrentPoint(this);
|
||
|
|
if (point.Properties.IsLeftButtonPressed)
|
||
|
|
{
|
||
|
|
// The ListBox handles selection automatically
|
||
|
|
// Additional click handling can be added here
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|