mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 19:49:15 +08:00
41 lines
970 B
C#
41 lines
970 B
C#
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 ResultListBox
|
|
{
|
|
public void AddResults(List<Result> newResults, string resultId)
|
|
{
|
|
var vm = this.DataContext as ResultsViewModel;
|
|
vm.AddResults(newResults, resultId);
|
|
}
|
|
|
|
|
|
public ResultListBox()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void lbResults_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
{
|
|
if (e.AddedItems.Count > 0 && e.AddedItems[0] != null)
|
|
{
|
|
ScrollIntoView(e.AddedItems[0]);
|
|
}
|
|
}
|
|
|
|
}
|
|
} |