mirror of
https://github.com/oMaN-Rod/nxDumpFuse.git
synced 2024-11-22 10:16:40 +00:00
Hack to change error log entry, binding color is not working
This commit is contained in:
parent
f7dec5d29d
commit
170fe100ec
2 changed files with 11 additions and 1 deletions
|
@ -46,7 +46,8 @@
|
|||
VerticalScrollBarVisibility="Auto"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalAlignment="Top"
|
||||
Height="300">
|
||||
Height="300"
|
||||
LoadingRow="FuseSimpleLog_OnLoadingRow">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Type" Binding="{Binding Type}" Width="Auto"
|
||||
Foreground="{Binding Color}" FontSize="12" />
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Media;
|
||||
using nxDumpFuse.Model;
|
||||
using nxDumpFuse.Model.Enums;
|
||||
using nxDumpFuse.ViewModels;
|
||||
|
||||
namespace nxDumpFuse.Views
|
||||
|
@ -15,5 +18,11 @@ namespace nxDumpFuse.Views
|
|||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
private void FuseSimpleLog_OnLoadingRow(object? sender, DataGridRowEventArgs e)
|
||||
{
|
||||
if (e.Row.DataContext is FuseSimpleLog { Type: FuseSimpleLogType.Error })
|
||||
e.Row.Background = Brushes.Red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue