Flow.Launcher/Plugins/Flow.Launcher.Plugin.Sys/SysSettings.xaml.cs

32 lines
947 B
C#
Raw Permalink Normal View History

using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
2020-04-21 09:12:17 +00:00
namespace Flow.Launcher.Plugin.Sys
2015-01-09 01:44:03 +00:00
{
public partial class SysSettings : UserControl
{
public SysSettings(List<Result> Results)
{
InitializeComponent();
2015-01-09 01:44:03 +00:00
foreach (var Result in Results)
{
2016-01-06 21:34:42 +00:00
lbxCommands.Items.Add(Result);
2015-01-09 01:44:03 +00:00
}
}
private void ListView_SizeChanged(object sender, SizeChangedEventArgs e)
{
ListView listView = sender as ListView;
GridView gView = listView.View as GridView;
var workingWidth = listView.ActualWidth - SystemParameters.VerticalScrollBarWidth; // take into account vertical scrollbar
var col1 = 0.3;
var col2 = 0.7;
gView.Columns[0].Width = workingWidth * col1;
gView.Columns[1].Width = workingWidth * col2;
}
2015-01-09 01:44:03 +00:00
}
}