SPARK-1691 correct order-type-columns' vertical alignment (present in fills and orderbook)
This commit is contained in:
1 parent
98e34aafcd
commit
f3266cbcec
2 files changed
+31
-5
No files matched your search
+5
-1
@@ -21,7 +21,11 @@ namespace mbts.ui.controls {
|
||||
public BindingBase font_weight_binding { get; set; }
|
||||
|
||||
public override FrameworkElement view_factory() {
|
||||
var v = new OrderTypeItem { FontFamily = font_family };
|
||||
var v = new OrderTypeItem {
|
||||
FontFamily = font_family,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
VerticalContentAlignment = VerticalAlignment.Center
|
||||
};
|
||||
v.SetBinding(OrderTypeItem.OrderTypeProperty, _order_type_binding);
|
||||
v.SetBinding(OrderTypeItem.MetadataProperty, _metadata_binding);
|
||||
if (font_weight_binding != null) {
|
||||
|
||||
@@ -9,14 +9,36 @@
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="usp:OrderTypeItem">
|
||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
|
||||
<Grid>
|
||||
<Border
|
||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Background="{TemplateBinding Background}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
>
|
||||
<Grid
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<c:Badge Background="{Binding Metadata, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource OrderTypeBrushConverter}}" BorderThickness="1" Width="15" Height="10" HorizontalAlignment="Left" />
|
||||
<TextBlock Text="{Binding OrderType, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource OrderTypeDisplayTextConverter}}" Margin="20,0,0,0" HorizontalAlignment="Left" />
|
||||
<c:Badge
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Background="{Binding Metadata, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource OrderTypeBrushConverter}}"
|
||||
BorderThickness="1"
|
||||
Width="15"
|
||||
Height="10"
|
||||
/>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Margin="20,0,0,0"
|
||||
Text="{Binding OrderType, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource OrderTypeDisplayTextConverter}}"
|
||||
/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
|
||||
Reference in new issue
Block a user