refactor: Change MultiSelectDropDowns to ComboCheckBox in vs settings
This commit is contained in:
1 parent
b6ac345ee6
commit
925c301cbe
2 files changed
+28
-10
No files matched your search
@@ -1,4 +1,4 @@
|
||||
<Window
|
||||
<Window
|
||||
x:Class="mbts.ui.shell.VolSurfaceSettingsEditor"
|
||||
x:ClassModifier="internal"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
@@ -180,22 +180,42 @@
|
||||
<DataGridTemplateColumn Header="Master">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<c:MultiSelectDropDown
|
||||
<c:ComboCheckBox
|
||||
Margin="4"
|
||||
ItemsSource="{Binding driver.symbols}"
|
||||
SelectedItems="{Binding masters}"
|
||||
TextBlock.Foreground="Black" />
|
||||
TextBlock.Foreground="Black">
|
||||
<c:ComboCheckBox.HeaderContent>
|
||||
<MultiBinding>
|
||||
<MultiBinding.Converter>
|
||||
<cv:SelectedItemsHeaderTextConverter ShowFraction="False" />
|
||||
</MultiBinding.Converter>
|
||||
<Binding Path="mastersi" />
|
||||
<Binding Path="driver.symbols.Count" />
|
||||
</MultiBinding>
|
||||
</c:ComboCheckBox.HeaderContent>
|
||||
</c:ComboCheckBox>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="Mkt Imp Vol">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<c:MultiSelectDropDown
|
||||
<c:ComboCheckBox
|
||||
Margin="4"
|
||||
ItemsSource="{Binding driver.symbols}"
|
||||
SelectedItems="{Binding fits}"
|
||||
TextBlock.Foreground="Black" />
|
||||
TextBlock.Foreground="Black">
|
||||
<c:ComboCheckBox.HeaderContent>
|
||||
<MultiBinding>
|
||||
<MultiBinding.Converter>
|
||||
<cv:SelectedItemsHeaderTextConverter ShowFraction="False" />
|
||||
</MultiBinding.Converter>
|
||||
<Binding Path="fitsi" />
|
||||
<Binding Path="driver.symbols.Count" />
|
||||
</MultiBinding>
|
||||
</c:ComboCheckBox.HeaderContent>
|
||||
</c:ComboCheckBox>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
@@ -152,15 +152,13 @@ namespace mbts.spark.VolSurface {
|
||||
}));
|
||||
|
||||
VolSurfaceSimplifiedColumn create_exp_column_view() {
|
||||
var filter = new MultiSelectDropDown() { HeaderText = "Expirations" };
|
||||
var filter = new ComboCheckBox() { HeaderContent = "Expirations" };
|
||||
filter.Foreground = Brushes.Black;
|
||||
filter.SetBinding(MultiSelectDropDown.ItemsSourceProperty, new Binding() {
|
||||
Path = new PropertyPath("rows"),
|
||||
filter.SetBinding(ItemsControl.ItemsSourceProperty, new Binding(nameof(rows)) {
|
||||
Source = this,
|
||||
Mode = BindingMode.OneWay
|
||||
});
|
||||
filter.SetBinding(MultiSelectDropDown.SelectedItemsProperty, new Binding() {
|
||||
Path = new PropertyPath("visible_rows"),
|
||||
filter.SetBinding(ComboCheckBox.SelectedItemsProperty, new Binding(nameof(visible_rows)) {
|
||||
Source = this,
|
||||
Mode = BindingMode.OneWay
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user