fix orderbook 'attach' popup (was stretching past x bounds)
This commit is contained in:
1 parent
3d96bc98e2
commit
63c3e2c93a
3 files changed
+16
-5
No files matched your search
+2
-2
@@ -594,14 +594,14 @@
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn IsReadOnly="True" Header="Param" CellTemplateSelector="{StaticResource ParamNameTemplateSelector}" Width="*">
|
||||
<DataGridTemplateColumn IsReadOnly="True" Header="Param" CellTemplateSelector="{StaticResource ParamNameTemplateSelector}" MinWidth="120" Width="*">
|
||||
<DataGridTemplateColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell" BasedOn="{StaticResource DataGridCellBaseStyle}">
|
||||
<Setter Property="IsTabStop" Value="False"/>
|
||||
</Style>
|
||||
</DataGridTemplateColumn.CellStyle>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="Value" CellTemplateSelector="{StaticResource ParamTemplateSelector}" CellEditingTemplateSelector="{StaticResource ParamEditingTemplateSelector}" Width="*">
|
||||
<DataGridTemplateColumn Header="Value" CellTemplateSelector="{StaticResource ParamTemplateSelector}" CellEditingTemplateSelector="{StaticResource ParamEditingTemplateSelector}" MinWidth="120" Width="*">
|
||||
<DataGridTemplateColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell" BasedOn="{StaticResource DataGridCellBaseStyle}">
|
||||
<Style.Triggers>
|
||||
|
||||
+5
-3
@@ -6,6 +6,7 @@ using mbts.ui.converters;
|
||||
using mbts.ui.utility;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
@@ -122,9 +123,10 @@ namespace mbts.ui.spark {
|
||||
public void commit_edit() => CommitEditRequested?.Invoke();
|
||||
public void cancel_edit() => CancelEditRequested?.Invoke();
|
||||
|
||||
void _set_value_column_width() =>
|
||||
_param_grid?.Columns?.Skip(1).empty_if_null().ApplyToFirst(c =>
|
||||
c.Width = _stretch_value_column ? new DataGridLength(1, DataGridLengthUnitType.Star) : DataGridLength.Auto);
|
||||
void _set_value_column_width() {
|
||||
foreach (var c in _param_grid?.Columns.empty_if_null())
|
||||
c.Width = _stretch_value_column ? new DataGridLength(1, DataGridLengthUnitType.Star) : DataGridLength.Auto;
|
||||
}
|
||||
|
||||
void _on_execution_strategy_toggle_click(object sender, RoutedEventArgs e) {
|
||||
if (sender is Hyperlink hl && hl.try_find_ancestor_of_type(out DataGridRow row_view)) {
|
||||
|
||||
@@ -66,6 +66,15 @@ namespace bts.collections {
|
||||
}
|
||||
}
|
||||
|
||||
public static bool TryGetAt<T>(this IList<T> list, int index, out T value) {
|
||||
if (index >= 0 && index < list.Count) {
|
||||
value = list[index];
|
||||
return true;
|
||||
}
|
||||
value = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static IList<T> WrapValue<T>(T value) =>
|
||||
new ValueListWrapper<T>(value);
|
||||
|
||||
|
||||
Reference in new issue
Block a user