OrderTicket - set OrderDetailsPopupControl DataContext to properties_vm (make bindings in ControlTemplate work for ladder and ticket)
This commit is contained in:
1 parent
fd0236920a
commit
f5852175fd
2 files changed
+8
-7
No files matched your search
@@ -173,14 +173,15 @@
|
||||
/>
|
||||
<uag:OrderDetailsPopupControl
|
||||
Grid.Row="2"
|
||||
usp:OrderModificationControl.IsDirty="{Binding order_type_dirty, FallbackValue={u:False}}"
|
||||
HasEditableProperties="{Binding properties_vm.selected_order_type.has_editable_properties, FallbackValue={u:False}}"
|
||||
DataContext="{Binding properties_vm}"
|
||||
usp:OrderModificationControl.IsDirty="{Binding DataContext.order_type_dirty, RelativeSource={RelativeSource AncestorType=usp:OrderModificationControl}, FallbackValue={u:False}}"
|
||||
HasEditableProperties="{Binding selected_order_type.has_editable_properties, FallbackValue={u:False}}"
|
||||
IsAlgoTemplateToolBarReadOnly="True"
|
||||
IsEnabled="{Binding can_change_order_type, FallbackValue={u:True}}"
|
||||
IsOpen="{Binding properties_vm.selected_order_type.editable_properties_open, FallbackValue={u:False}}"
|
||||
ItemsSource="{Binding properties_vm.order_types}"
|
||||
IsEnabled="{Binding DataContext.can_change_order_type, RelativeSource={RelativeSource AncestorType=usp:OrderModificationControl}, FallbackValue={u:True}}"
|
||||
IsOpen="{Binding selected_order_type.editable_properties_open, FallbackValue={u:False}}"
|
||||
ItemsSource="{Binding order_types}"
|
||||
Margin="0,2"
|
||||
SelectedItem="{Binding properties_vm.selected_order_type}"
|
||||
SelectedItem="{Binding selected_order_type}"
|
||||
>
|
||||
<uag:OrderDetailsPopupControl.Style>
|
||||
<Style TargetType="uag:OrderDetailsPopupControl" BasedOn="{StaticResource {x:Type uag:OrderDetailsPopupControl}}">
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
IsReadOnly="{TemplateBinding IsAlgoTemplateToolBarReadOnly}"
|
||||
NewItemFactory="{Binding algo_template_factory}"
|
||||
Padding="0,1,0,3"
|
||||
Header="{Binding selected_order_type.order_type, Converter={StaticResource OrderTypeDisplayTextConverter}}"
|
||||
Header="{Binding SelectedItem.order_type, RelativeSource={RelativeSource AncestorType=uag:OrderDetailsPopupControl}, Converter={StaticResource OrderTypeDisplayTextConverter}}"
|
||||
HeaderTemplate="{StaticResource AlgoTemplateHeaderContentTemplate}"
|
||||
RemoveCommand="{Binding remove_template_cmd}"
|
||||
RevertCommand="{Binding revert_template_changes_cmd}"
|
||||
|
||||
Reference in new issue
Block a user