| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <UserControl x:Class="TeamAAS_VP.Controls.myNumericUpDowm"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:TeamAAS_VP.Controls"
- xmlns:icon="http://metro.mahapps.com/winfx/xaml/iconpacks"
- xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
- xmlns:lex="http://wpflocalizeextension.codeplex.com"
- lex:LocalizeDictionary.DesignCulture="zh-CN"
- lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
- lex:ResxLocalizationProvider.DefaultDictionary="Lang"
- FontFamily="{DynamicResource DefaultFont}">
- <UserControl.Triggers>
- <EventTrigger RoutedEvent="GotFocus">
- <BeginStoryboard>
- <Storyboard>
- <BooleanAnimationUsingKeyFrames Storyboard.TargetName="SliderPopup"
- Storyboard.TargetProperty="IsOpen">
- <DiscreteBooleanKeyFrame KeyTime="0"
- Value="True" />
- </BooleanAnimationUsingKeyFrames>
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger>
- <EventTrigger RoutedEvent="LostFocus">
- <BeginStoryboard>
- <Storyboard>
- <BooleanAnimationUsingKeyFrames Storyboard.TargetName="SliderPopup"
- Storyboard.TargetProperty="IsOpen">
- <DiscreteBooleanKeyFrame KeyTime="0"
- Value="False" />
- </BooleanAnimationUsingKeyFrames>
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger>
- </UserControl.Triggers>
- <!--<Viewbox Stretch="Fill">
-
- </Viewbox>-->
- <Grid>
- <mah:NumericUpDown x:Name="MotorAmplitudeNumeric1"
- Style="{StaticResource MahApps.Styles.NumericUpDown.DataGrid.Editing}"
- BorderThickness="0,0,0,1"
- FontSize="{Binding FontSize, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
- <Popup x:Name="SliderPopup"
- Height="{Binding ElementName=MotorAmplitudeNumeric1, Path=Height}"
- PlacementTarget="{Binding ElementName=MotorAmplitudeNumeric1}"
- Placement="Bottom"
- AllowsTransparency="True"
- StaysOpen="False"
- Width="150">
- <Grid Background="Transparent">
- <Border Background="#575757"
- CornerRadius="0,0,3,3">
- <Slider x:Name="slider2"
- Margin="5,2,5,2"
- Foreground="#2196f3"
- IsSnapToTickEnabled="True"
- Maximum="{Binding ElementName=MotorAmplitudeNumeric1, Path=Maximum}"
- Minimum="{Binding ElementName=MotorAmplitudeNumeric1, Path=Minimum}"
- Value="{Binding ElementName=MotorAmplitudeNumeric1,Path=Value,Mode=TwoWay}" />
- </Border>
- </Grid>
- </Popup>
- </Grid>
- </UserControl>
|