Yes No formatting in row
This commit is contained in:
1 parent
57ca9596c8
commit
b07eec08b4
4 files changed
+28
-1
No files matched your search
@@ -63,6 +63,7 @@ namespace mbts.spark.filters {
|
||||
TimeFilter = "TimeFilterTemplate",
|
||||
DiscreteValues = "DiscreteValuesTemplate",
|
||||
EnumValues = "EnumValuesTemplate",
|
||||
Regex = "RegexTemplate";
|
||||
Regex = "RegexTemplate",
|
||||
YesNo = "YesNoTemplate";
|
||||
}
|
||||
}
|
||||
@@ -146,6 +146,27 @@
|
||||
/>
|
||||
</usp:FilterContentControl>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="YesNoTemplate">
|
||||
<usp:FilterContentControl
|
||||
ApplyCommandParameter="{Binding}"
|
||||
ApplyCommand="{x:Static c:DataGridFilterProperties.CommitCommand}"
|
||||
ClearCommandParameter="{Binding}"
|
||||
ClearCommand="{x:Static c:DataGridFilterProperties.ClearCommand}"
|
||||
>
|
||||
<c:ListBoxEx
|
||||
ItemsSource="{Binding items}"
|
||||
Selection="{Binding selected_items}"
|
||||
SelectionMode="Multiple"
|
||||
ItemContainerStyle="{StaticResource ListBoxItemCheckBoxStyle}"
|
||||
>
|
||||
<c:ListBoxEx.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Converter={StaticResource BoolToAffirmativeNameConverter}}"/>
|
||||
</DataTemplate>
|
||||
</c:ListBoxEx.ItemTemplate>
|
||||
</c:ListBoxEx>
|
||||
</usp:FilterContentControl>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="EnumValuesTemplate">
|
||||
<usp:FilterContentControl
|
||||
ApplyCommandParameter="{Binding}"
|
||||
|
||||
@@ -83,4 +83,7 @@
|
||||
<cv:NumericSignBrushConverter x:Key="PositionSignBrushConverter" Zero="{StaticResource IntZero}"/>
|
||||
<cv:NumericSignBrushConverter x:Key="DayChangeSignBrushConverter" Zero="{StaticResource DoubleZero}"/>
|
||||
<cv:QuantityMeasureCaseDisplayTextConverter x:Key="QuantityMeasureCaseDisplayConverter"/>
|
||||
<cv:ValueMap x:Key="BoolToAffirmativeNameConverter" Default="No">
|
||||
<cv:KeyValue Key="{u:True}" Value="Yes"/>
|
||||
</cv:ValueMap>
|
||||
</ResourceDictionary>
|
||||
@@ -186,6 +186,8 @@ namespace mbts.spark {
|
||||
public string weighted_average_sell_text => _weighted_average_sell.text;
|
||||
//
|
||||
public bool has_day_trades => day_long_quantity != 0 || day_short_quantity != 0;
|
||||
public string has_day_trades_text => has_day_trades ? "Yes" : "No";
|
||||
|
||||
|
||||
public void raise_invalidated() => invalidated?.Invoke();
|
||||
|
||||
|
||||
Reference in new issue
Block a user