diff --git a/v2rayN/v2rayN.Desktop/Views/ClashConnectionsView.axaml b/v2rayN/v2rayN.Desktop/Views/ClashConnectionsView.axaml
index dd1c94ac..7318e7de 100644
--- a/v2rayN/v2rayN.Desktop/Views/ClashConnectionsView.axaml
+++ b/v2rayN/v2rayN.Desktop/Views/ClashConnectionsView.axaml
@@ -42,6 +42,23 @@
+
+
{
@@ -42,6 +44,19 @@ namespace v2rayN.Desktop.Views
return await Task.FromResult(true);
}
+ private void BtnAutofitColumnWidth_Click(object? sender, RoutedEventArgs e)
+ {
+ AutofitColumnWidth();
+ }
+
+ private void AutofitColumnWidth()
+ {
+ foreach (var it in lstConnections.Columns)
+ {
+ it.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
+ }
+ }
+
private void btnClose_Click(object? sender, RoutedEventArgs e)
{
ViewModel?.ClashConnectionClose(false);
diff --git a/v2rayN/v2rayN/Views/ClashConnectionsView.xaml b/v2rayN/v2rayN/Views/ClashConnectionsView.xaml
index 88f6b3d1..779354e7 100644
--- a/v2rayN/v2rayN/Views/ClashConnectionsView.xaml
+++ b/v2rayN/v2rayN/Views/ClashConnectionsView.xaml
@@ -39,6 +39,16 @@
+
+
{
@@ -45,6 +47,18 @@ namespace v2rayN.Views
return await Task.FromResult(true);
}
+ private void BtnAutofitColumnWidth_Click(object sender, RoutedEventArgs e)
+ {
+ AutofitColumnWidth();
+ }
+ private void AutofitColumnWidth()
+ {
+ foreach (var it in lstConnections.Columns)
+ {
+ it.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
+ }
+ }
+
private void btnClose_Click(object sender, System.Windows.RoutedEventArgs e)
{
ViewModel?.ClashConnectionClose(false);