| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <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:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:icon="http://metro.mahapps.com/winfx/xaml/iconpacks"
- xmlns:lex="http://wpflocalizeextension.codeplex.com"
- xmlns:local="clr-namespace:TeamAAS_VP.Controls"
- xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- 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"
- BorderThickness="0,0,0,1"
- FontSize="{Binding FontSize, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
- Style="{StaticResource MahApps.Styles.NumericUpDown.DataGrid.Editing}" />
- <Popup
- x:Name="SliderPopup"
- Width="150"
- Height="{Binding ElementName=MotorAmplitudeNumeric1, Path=Height}"
- AllowsTransparency="True"
- Placement="Bottom"
- PlacementTarget="{Binding ElementName=MotorAmplitudeNumeric1}"
- StaysOpen="False">
- <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>
|