Use colour emoji in mainwindow datagrid

This commit is contained in:
Private 2024-06-18 15:50:00 +03:30
parent fcf1e9d23a
commit 692e72ec18

View file

@ -689,45 +689,50 @@
</DataGrid.Resources> </DataGrid.Resources>
<DataGrid.Columns> <DataGrid.Columns>
<base:MyDGTextColumn <DataGridTextColumn
Width="80" Width="80"
Binding="{Binding configType}" Binding="{Binding configType}"
ExName="configType" Header="{x:Static resx:ResUI.LvServiceType}"
Header="{x:Static resx:ResUI.LvServiceType}" /> base:MyDgTextColumnAttachedProperties.ExName="configType" />
<base:MyDGTextColumn <DataGridTemplateColumn
Width="150" Width="150"
Binding="{Binding remarks}" Header="{x:Static resx:ResUI.LvRemarks}"
ExName="remarks" base:MyDgTextColumnAttachedProperties.ExName="remarks">
Header="{x:Static resx:ResUI.LvRemarks}" /> <DataGridTemplateColumn.CellTemplate>
<base:MyDGTextColumn <DataTemplate>
<emoji:TextBlock Text="{Binding remarks}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn
Width="120" Width="120"
Binding="{Binding address}" Binding="{Binding address}"
ExName="address" base:MyDgTextColumnAttachedProperties.ExName="address"
Header="{x:Static resx:ResUI.LvAddress}" /> Header="{x:Static resx:ResUI.LvAddress}" />
<base:MyDGTextColumn <DataGridTextColumn
Width="60" Width="60"
Binding="{Binding port}" Binding="{Binding port}"
ExName="port" base:MyDgTextColumnAttachedProperties.ExName="port"
Header="{x:Static resx:ResUI.LvPort}" /> Header="{x:Static resx:ResUI.LvPort}" />
<base:MyDGTextColumn <DataGridTextColumn
Width="100" Width="100"
Binding="{Binding network}" Binding="{Binding network}"
ExName="network" base:MyDgTextColumnAttachedProperties.ExName="network"
Header="{x:Static resx:ResUI.LvTransportProtocol}" /> Header="{x:Static resx:ResUI.LvTransportProtocol}" />
<base:MyDGTextColumn <DataGridTextColumn
Width="100" Width="100"
Binding="{Binding streamSecurity}" Binding="{Binding streamSecurity}"
ExName="streamSecurity" base:MyDgTextColumnAttachedProperties.ExName="streamSecurity"
Header="{x:Static resx:ResUI.LvTLS}" /> Header="{x:Static resx:ResUI.LvTLS}" />
<base:MyDGTextColumn <DataGridTextColumn
Width="100" Width="100"
Binding="{Binding subRemarks}" Binding="{Binding subRemarks}"
ExName="subRemarks" base:MyDgTextColumnAttachedProperties.ExName="subRemarks"
Header="{x:Static resx:ResUI.LvSubscription}" /> Header="{x:Static resx:ResUI.LvSubscription}" />
<base:MyDGTextColumn <DataGridTextColumn
Width="100" Width="100"
Binding="{Binding delayVal}" Binding="{Binding delayVal}"
ExName="delayVal" base:MyDgTextColumnAttachedProperties.ExName="delayVal"
Header="{x:Static resx:ResUI.LvTestDelay}"> Header="{x:Static resx:ResUI.LvTestDelay}">
<DataGridTextColumn.ElementStyle> <DataGridTextColumn.ElementStyle>
<Style TargetType="{x:Type TextBlock}"> <Style TargetType="{x:Type TextBlock}">
@ -735,42 +740,42 @@
<Setter Property="Foreground" Value="{Binding delay, Converter={StaticResource DelayColorConverter}}" /> <Setter Property="Foreground" Value="{Binding delay, Converter={StaticResource DelayColorConverter}}" />
</Style> </Style>
</DataGridTextColumn.ElementStyle> </DataGridTextColumn.ElementStyle>
</base:MyDGTextColumn> </DataGridTextColumn>
<base:MyDGTextColumn <DataGridTextColumn
Width="100" Width="100"
Binding="{Binding speedVal}" Binding="{Binding speedVal}"
ExName="speedVal" base:MyDgTextColumnAttachedProperties.ExName="speedVal"
Header="{x:Static resx:ResUI.LvTestSpeed}"> Header="{x:Static resx:ResUI.LvTestSpeed}">
<DataGridTextColumn.ElementStyle> <DataGridTextColumn.ElementStyle>
<Style TargetType="{x:Type TextBlock}"> <Style TargetType="{x:Type TextBlock}">
<Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="HorizontalAlignment" Value="Right" />
</Style> </Style>
</DataGridTextColumn.ElementStyle> </DataGridTextColumn.ElementStyle>
</base:MyDGTextColumn> </DataGridTextColumn>
<base:MyDGTextColumn <DataGridTextColumn
x:Name="colTodayUp" x:Name="colTodayUp"
Width="100" Width="100"
Binding="{Binding todayUp}" Binding="{Binding todayUp}"
ExName="todayUp" base:MyDgTextColumnAttachedProperties.ExName="todayUp"
Header="{x:Static resx:ResUI.LvTodayUploadDataAmount}" /> Header="{x:Static resx:ResUI.LvTodayUploadDataAmount}" />
<base:MyDGTextColumn <DataGridTextColumn
x:Name="colTodayDown" x:Name="colTodayDown"
Width="100" Width="100"
Binding="{Binding todayDown}" Binding="{Binding todayDown}"
ExName="todayDown" base:MyDgTextColumnAttachedProperties.ExName="todayDown"
Header="{x:Static resx:ResUI.LvTodayDownloadDataAmount}" /> Header="{x:Static resx:ResUI.LvTodayDownloadDataAmount}" />
<base:MyDGTextColumn <DataGridTextColumn
x:Name="colTotalUp" x:Name="colTotalUp"
Width="100" Width="100"
Binding="{Binding totalUp}" Binding="{Binding totalUp}"
ExName="totalUp" base:MyDgTextColumnAttachedProperties.ExName="totalUp"
Header="{x:Static resx:ResUI.LvTotalUploadDataAmount}" /> Header="{x:Static resx:ResUI.LvTotalUploadDataAmount}" />
<base:MyDGTextColumn <DataGridTextColumn
x:Name="colTotalDown" x:Name="colTotalDown"
Width="100" Width="100"
Binding="{Binding totalDown}" Binding="{Binding totalDown}"
ExName="totalDown" base:MyDgTextColumnAttachedProperties.ExName="totalDown"
Header="{x:Static resx:ResUI.LvTotalDownloadDataAmount}" /> Header="{x:Static resx:ResUI.LvTotalDownloadDataAmount}" />
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>