mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
41
Wox/ResultListBox.xaml.cs
Normal file
41
Wox/ResultListBox.xaml.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Remoting.Contexts;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using Wox.Core.UserSettings;
|
||||
using Wox.Helper;
|
||||
using Wox.Plugin;
|
||||
using Wox.Storage;
|
||||
using Wox.ViewModel;
|
||||
|
||||
namespace Wox
|
||||
{
|
||||
[Synchronization]
|
||||
public partial class ResultPanel : UserControl
|
||||
{
|
||||
public void AddResults(List<Result> newResults, string resultId)
|
||||
{
|
||||
var vm = this.DataContext as ResultPanelViewModel;
|
||||
vm.AddResults(newResults, resultId);
|
||||
}
|
||||
|
||||
|
||||
public ResultPanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void lbResults_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (e.AddedItems.Count > 0 && e.AddedItems[0] != null)
|
||||
{
|
||||
lbResults.ScrollIntoView(e.AddedItems[0]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user