Skip to content

Commit 03658e1

Browse files
committed
Updated visibility handling for type column
1 parent 73afd40 commit 03658e1

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

MessageCommunicator.TestGui/Views/_LoggingView/LoggingView.xaml.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,26 @@ namespace MessageCommunicator.TestGui.Views
66
{
77
public class LoggingView : OwnUserControl<LoggingViewModel>
88
{
9+
private DataGridColumn _columnTypeColor;
910
private DataGridColumn _columnType;
1011

1112
public bool IsTypeColumnVisible
1213
{
1314
get => _columnType.IsVisible;
14-
set => _columnType.IsVisible = value;
15+
set
16+
{
17+
_columnType.IsVisible = value;
18+
_columnTypeColor.IsVisible = value;
19+
}
1520
}
1621

1722
public LoggingView()
1823
{
1924
AvaloniaXamlLoader.Load(this);
2025

2126
var ctrlDataGrid = this.FindControl<DataGrid>("CtrlDataGrid");
22-
_columnType = ctrlDataGrid.Columns[1];
27+
_columnTypeColor = ctrlDataGrid.Columns[1];
28+
_columnType = ctrlDataGrid.Columns[2];
2329
}
2430
}
2531
}

0 commit comments

Comments
 (0)