Files
test_demo/MX-PD-盘古 - new/PanGu.DieBonderApp/MainShell/Resources/CustomControl/LightControl.xaml

34 lines
2.1 KiB
Plaintext
Raw Normal View History

<UserControl x:Class="MainShell.Resources.CustomControl.LightControl"
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:MainShell.Resources.CustomControl"
xmlns:mw="http://www.maxwell-gp.com/"
mc:Ignorable="d"
>
<Grid Margin="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="120"/>
</Grid.ColumnDefinitions>
<Border BorderThickness="1" Grid.ColumnSpan="3" BorderBrush="{StaticResource BackgroundDeepBrush}"/>
<TextBlock Grid.Column="0" FontWeight="Black" Style="{StaticResource TextBlockStyle}"
Text="{Binding Header, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
<Slider Grid.Column="1"
VerticalAlignment="Center"
Minimum="{Binding Min, RelativeSource={RelativeSource AncestorType=UserControl}}"
Maximum="{Binding Max, RelativeSource={RelativeSource AncestorType=UserControl}}"
TickFrequency="{Binding Tick, RelativeSource={RelativeSource AncestorType=UserControl}}"
IsSnapToTickEnabled="True"
Value="{Binding Value, RelativeSource={RelativeSource AncestorType=UserControl}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<mw:IntNumberBox Grid.Column="2" HorizontalContentAlignment="Right" Margin="6,0,0,0"
Minimum="{Binding Min, RelativeSource={RelativeSource AncestorType=UserControl}}"
Maximum="{Binding Max, RelativeSource={RelativeSource AncestorType=UserControl}}"
Value="{Binding Value, RelativeSource={RelativeSource AncestorType=UserControl}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</UserControl>