Change ThresholdSlider to a grid, to make things easier to position. StackPanel is too limited for this.

master
Glenn Maynard 5 years ago
parent 883d87779a
commit 18475afbf8
  1. 26
      smx-config/MainWindow.xaml

@ -135,23 +135,23 @@ Use if the platform is too sensitive.</clr:String>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:ThresholdSlider}">
<StackPanel Margin="0,0,0,0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid Margin="0,0,0,0" Width="400" HorizontalAlignment="Center" VerticalAlignment="Center">
<Image
Margin="0,0,0,0"
Margin="-370,0,0,0"
Height="28" Width="28"
HorizontalAlignment="Left" VerticalAlignment="Top"
VerticalAlignment="Top"
Source="{TemplateBinding Icon}"
/>
<Label Margin="5,0,0,0" x:Name="LowerValue" Content="0" Width="30" HorizontalContentAlignment="Right"
HorizontalAlignment="Left" VerticalAlignment="Top"
<Label Margin="-300,0,0,0" x:Name="LowerValue" Content="0" Width="30" HorizontalContentAlignment="Right"
VerticalAlignment="Top"
/>
<Image x:Name="ThresholdWarning"
Source="Resources/threshold_warning.png" Width="9" Height="28"
Margin="10,0,0,0"
Margin="-240,0,0,0"
Visibility="Visible"
/>
/>
<controls:DoubleSlider x:Name="Slider"
Margin="24,5,0,0"
Margin="50,5,0,0"
MinimumDistance="10"
LowerValue="20" UpperValue="35"
VerticalAlignment="Top"
@ -159,10 +159,10 @@ Use if the platform is too sensitive.</clr:String>
Focusable="False"
Style="{DynamicResource DoubleSlider}"
/>
<Label Margin="11,0,0,0" x:Name="UpperValue" Content="0" Width="40" HorizontalContentAlignment="Center"
HorizontalAlignment="Left" VerticalAlignment="Top"
<Label Margin="360,0,0,0" x:Name="UpperValue" Content="0" Width="40" HorizontalContentAlignment="Center"
VerticalAlignment="Top"
/>
</StackPanel>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
@ -847,7 +847,9 @@ Use if the platform is too sensitive.</clr:String>
DockPanel.Dock="Top"
>
<DockPanel Margin="0,0,0,0" VerticalAlignment="Top" x:Name="ThresholdSliderContainer">
<!-- CreateThresholdSliders adds ThresholdSliders here. -->
<!-- CreateThresholdSliders adds ThresholdSliders here. The slider below is only
for the UI preview, and is removed on refresh. -->
<controls:ThresholdSlider DockPanel.Dock="Top" controls:ThresholdSlider.Type="up-left" controls:ThresholdSlider.Icon="Resources/pad_up_left.png" Margin="0,8,0,0" />
</DockPanel>
</ScrollViewer>
<TextBlock DockPanel.Dock="Top" HorizontalAlignment="Center" Margin="0,25,0,0" VerticalAlignment="Top"

Loading…
Cancel
Save