mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 19:19:23 +08:00
28 lines
670 B
C#
28 lines
670 B
C#
using System.Runtime.Remoting.Contexts;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Input;
|
|
|
|
namespace Wox
|
|
{
|
|
[Synchronization]
|
|
public partial class ResultListBox
|
|
{
|
|
public ResultListBox()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
{
|
|
if (e.AddedItems.Count > 0 && e.AddedItems[0] != null)
|
|
{
|
|
ScrollIntoView(e.AddedItems[0]);
|
|
}
|
|
}
|
|
|
|
private void OnMouseEnter(object sender, MouseEventArgs e)
|
|
{
|
|
((ListBoxItem) sender).IsSelected = true;
|
|
}
|
|
}
|
|
} |