diff options
| author | Avi Levkovich <avi@twine-s.com> | 2018-11-22 17:05:01 +0200 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2018-11-22 17:05:01 +0200 |
| commit | 428926c2c15c34e289498e28c062670fc3488abd (patch) | |
| tree | c56a7bd8d086a820c9c4911ddd993c43370feafe /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views | |
| parent | 9da3c86aa9db1ba56b36c4cbc7ecde0bbfc24df3 (diff) | |
| parent | b34e5aaaa6c362c3294bdd973015c0148fcfa1d1 (diff) | |
| download | Tango-428926c2c15c34e289498e28c062670fc3488abd.tar.gz Tango-428926c2c15c34e289498e28c062670fc3488abd.zip | |
merge
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views')
2 files changed, 13 insertions, 2 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index 884f60875..9151cbaa0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -311,7 +311,7 @@ </StackPanel> </Border> - <controls:MultiSelectListBox x:Name="listBoxSegments" AutomationProperties.AutomationId="{x:Static automation:Developer.SegmentsListBox}" Style="{StaticResource {x:Type ListBox}}" SelectionMode="Extended" SelectionChanged="ListBox_SelectionChanged" ItemsSource="{Binding SegmentsCollectionView}" SelectedItem="{Binding SelectedSegment}" SelectedItemsList="{Binding SelectedSegments,Mode=TwoWay}" HorizontalContentAlignment="Stretch"> + <controls:MultiSelectListBox FocusVisualStyle="{x:Null}" x:Name="listBoxSegments" MouseEnter="listBoxSegments_MouseEnter" PreviewMouseDown="listBoxSegments_PreviewMouseDown" AutomationProperties.AutomationId="{x:Static automation:Developer.SegmentsListBox}" Style="{StaticResource {x:Type ListBox}}" SelectionMode="Extended" SelectionChanged="ListBox_SelectionChanged" ItemsSource="{Binding SegmentsCollectionView}" SelectedItem="{Binding SelectedSegment}" SelectedItemsList="{Binding SelectedSegments,Mode=TwoWay}" HorizontalContentAlignment="Stretch"> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem" BasedOn="{StaticResource basicListBoxItem}"> <EventSetter Event="PreviewMouseDown" Handler="ListBoxItem_PreviewMouseDown"></EventSetter> @@ -555,7 +555,7 @@ <Image Source="../Images/ruler.png" Width="32"></Image> <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Segment Length</TextBlock> </StackPanel> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" HideUpDownButtons="True" Width="90" HorizontalAlignment="Left" FontFamily="{StaticResource digital-7}" StringFormat="{}{0:N1} m" Margin="0 2 0 0" Minimum="1" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding SelectedSegment.Length,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown x:Name="numSegmentLength" FontSize="{StaticResource NumbersFontSize}" HideUpDownButtons="True" Width="90" HorizontalAlignment="Left" FontFamily="{StaticResource digital-7}" StringFormat="{}{0:N1} m" Margin="0 2 0 0" Minimum="1" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding SelectedSegment.Length,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></mahapps:NumericUpDown> </StackPanel> </Border> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs index f7e2e8260..d96f130ae 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs @@ -281,5 +281,16 @@ namespace Tango.MachineStudio.Developer.Views { listBoxSegments.SelectedItem = (sender as ListBoxItem).DataContext; } + + private void listBoxSegments_PreviewMouseDown(object sender, MouseButtonEventArgs e) + { + + } + + private void listBoxSegments_MouseEnter(object sender, MouseEventArgs e) + { + Keyboard.ClearFocus(); + listBoxSegments.Focus(); + } } } |
