mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-12-25 11:54:43 +08:00
31 lines
825 B
C#
31 lines
825 B
C#
|
using System.Windows;
|
||
|
using System.Windows.Controls;
|
||
|
|
||
|
#nullable enable
|
||
|
namespace BililiveRecorder.WPF.Controls
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Interaction logic for LogPanel.xaml
|
||
|
/// </summary>
|
||
|
public partial class LogPanel : UserControl
|
||
|
{
|
||
|
public LogPanel()
|
||
|
{
|
||
|
this.InitializeComponent();
|
||
|
}
|
||
|
|
||
|
private void ListView_SizeChanged(object sender, SizeChangedEventArgs e)
|
||
|
{
|
||
|
if (sender is not ListView listView) return;
|
||
|
if (listView.View is not GridView view) return;
|
||
|
|
||
|
var w = listView.ActualWidth - SystemParameters.VerticalScrollBarWidth - 105 - 60 - 105;
|
||
|
|
||
|
view.Columns[0].Width = 105;
|
||
|
view.Columns[1].Width = 60;
|
||
|
view.Columns[2].Width = 105;
|
||
|
view.Columns[3].Width = w;
|
||
|
}
|
||
|
}
|
||
|
}
|