ui (pnl): Indicate 'has day trades' w/ check mark
Instead of 'Yes/No'
This commit is contained in:
1 parent
b222cd3e55
commit
f614fb7e7d
1 file changed
+36
-1
@@ -342,6 +342,32 @@
|
||||
'(c:DIYGrid.Column).horizontal_alignment', RelativeSource={RelativeSource Self}}" />
|
||||
</Style>
|
||||
|
||||
<!-- Needed because c:TextCell doesn't support unicode characters, such as '✓' -->
|
||||
<Style x:Key="CheckMarkCell" TargetType="Border">
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="Background" Value="{Binding background, Converter={x:Static cv:ColorToBrushConverter.Instance}}" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CheckMarkText" TargetType="TextBlock">
|
||||
<Setter
|
||||
Property="HorizontalAlignment"
|
||||
Value="{Binding
|
||||
'(c:DIYGrid.Column).horizontal_alignment',
|
||||
RelativeSource={RelativeSource AncestorType=Border}}" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter
|
||||
Property="FontFamily"
|
||||
Value="{Binding
|
||||
'(c:DIYGrid.Column).font_family', RelativeSource={RelativeSource Self}}" />
|
||||
<Setter
|
||||
Property="FontSize"
|
||||
Value="{Binding '(c:DIYGrid.Column).font_size', RelativeSource={RelativeSource Self}}" />
|
||||
<Setter Property="FontWeight" Value="{Binding font_weight}" />
|
||||
<Setter Property="Foreground" Value="{Binding foreground, Converter={x:Static cv:ColorToBrushConverter.Instance}}" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HyperlinkCellBase" TargetType="c:HyperlinkCell">
|
||||
<Setter Property="c:DIYGrid.Grid" Value="{Binding RelativeSource={RelativeSource AncestorType=c:DIYGrid}}"/>
|
||||
<Setter Property="Background">
|
||||
@@ -1219,7 +1245,16 @@
|
||||
c:DIYGrid.ColumnKey="DayTheta"
|
||||
DataContext="{Binding day_theta}"
|
||||
Style="{StaticResource RowTextCell}" />
|
||||
<c:TextCell c:DIYGrid.ColumnKey="HasDayTrades" DataContext="{Binding has_day_trades}" Style="{StaticResource RowTextCell}"/>
|
||||
|
||||
<Border
|
||||
c:DIYGrid.ColumnKey="HasDayTrades"
|
||||
DataContext="{Binding has_day_trades}"
|
||||
Style="{StaticResource CheckMarkCell}">
|
||||
<TextBlock
|
||||
Text="{Binding value, Converter={StaticResource BooleanToCheckConverter}}"
|
||||
Style="{StaticResource CheckMarkText}" />
|
||||
</Border>
|
||||
|
||||
<!--Market (Day)-->
|
||||
<c:TextCell c:DIYGrid.ColumnKey="LastPrice" DataContext="{Binding last_price}" Style="{StaticResource RowTextCell}"/>
|
||||
<c:TextCell c:DIYGrid.ColumnKey="SettlementPrice" DataContext="{Binding settlement_price}" Style="{StaticResource RowTextCell}"/>
|
||||
|
||||
Reference in new issue
Block a user