AlgoStudio/Ladder - set default TextBox Enter/Esc key behavior

This commit is contained in:
John Colvin committed 2019-02-06 18:20:18 -06:00
1 parent 987d0dabd3
commit fc2e9423b7
2 files changed
+18 -3

No files matched your search

@@ -22,6 +22,7 @@
<ResourceDictionary Source="/view/Controls/Order/AlgoPickerNodeView.xaml"/>
<ResourceDictionary Source="/view/Controls/Order/AlgoContentTemplateSelector.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--Primitive Constants-->
<sys:Double x:Key="HorizontalPush1">4</sys:Double>
<sys:Double x:Key="HorizontalPush2">8</sys:Double>
<sys:Double x:Key="HorizontalPush3">12</sys:Double>
@@ -33,6 +34,7 @@
<Thickness x:Key="Margin.LP3" Left="{StaticResource HorizontalPush3}"/>
<Thickness x:Key="Margin.TP1" Top="{StaticResource VerticalPush1}"/>
<Thickness x:Key="Margin.TP2" Top="{StaticResource VerticalPush2}"/>
<!--Converters-->
<cv:ValueMap x:Key="AlgoTemplateFavoriteToggleButtonToolTipConverter" Default="Add to Favorites">
<cv:KeyValue Key="{u:True}" Value="Remove from Favorites"/>
</cv:ValueMap>
@@ -43,11 +45,17 @@
<cv:KeyValue Key="{x:Static sys:String.Empty}" Value="{StaticResource AlgoAbbreviationInactiveState}"/>
</cv:ValueMap>
<uspcv:OrderTypeBrushConverter x:Key="OrderTypeBrushConverter" DefaultBrush="Transparent"/>
<!--Default Styles-->
<Style TargetType="GroupBox">
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="8"/>
</Style>
<Style TargetType="TextBox">
<Setter Property="u:TextBoxBehavior.EnterKeyBehavior" Value="CommitAndRelease"/>
<Setter Property="u:TextBoxBehavior.ReleaseOnEscape" Value="True"/>
</Style>
<!--Custom Styles-->
<Style x:Key="RectangleBadgeStyle" TargetType="Rectangle">
<Setter Property="Width" Value="17"/>
<Setter Property="Height" Value="12"/>
@@ -125,6 +133,7 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="AlgoTemplateFavoriteToggleButtonStyle" TargetType="ToggleButton">
<Setter Property="Background" Value="LightGray"/>
<Setter Property="BorderBrush" Value="Black"/>
@@ -421,7 +430,6 @@
x:Name="name_text_box"
Grid.Column="1"
ToolTipService.ShowOnDisabled="True"
u:TextBoxBehavior.EnterKeyBehavior="CommitAndRelease"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Margin="{StaticResource Margin.LP1}"
@@ -626,4 +634,4 @@
</Grid>
</Grid>
</AdornerDecorator>
</UserControl>
</UserControl>
@@ -443,7 +443,14 @@
ItemsSource="{Binding algo_definitions_view}"
SelectedItem="{Binding selected_algo_definition}"
Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path = DataContext.show_order_type, Converter={StaticResource BooleanToVisibilityConverter}}"
/>
>
<uag:OrderDetailsPopupControl.Resources>
<Style TargetType="TextBox">
<Setter Property="mbts:TextBoxBehavior.EnterKeyBehavior" Value="CommitAndRelease"/>
<Setter Property="mbts:TextBoxBehavior.ReleaseOnEscape" Value="True"/>
</Style>
</uag:OrderDetailsPopupControl.Resources>
</uag:OrderDetailsPopupControl>
<!-- Position into qty button -->
<Button
Margin="2"