fix vertical issue, fix coerce typo.
This commit is contained in:
@@ -17,5 +17,6 @@
|
||||
<u:NumericDoubleUpDown InnerLeftContent="Maximum" Value="{Binding #range.Maximum, Mode=TwoWay}" />
|
||||
<u:NumericDoubleUpDown InnerLeftContent="LowerValue" Value="{Binding #range.LowerValue, Mode=TwoWay}" />
|
||||
<u:NumericDoubleUpDown InnerLeftContent="UpperValue" Value="{Binding #range.UpperValue, Mode=TwoWay}" />
|
||||
<u:RangeSlider TickFrequency="5" Orientation="Vertical" Height="300"></u:RangeSlider>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Orientation="{Binding Orientation, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
LowerValue="{Binding LowerValue, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
Maximum="{Binding Maximum, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
Minimum="{Binding Minimum, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
@@ -144,6 +145,7 @@
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Orientation="{Binding Orientation, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
LowerValue="{Binding LowerValue, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
Maximum="{Binding Maximum, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
Minimum="{Binding Minimum, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
|
||||
@@ -234,12 +234,12 @@ public class RangeTrack: Control
|
||||
{
|
||||
return ValidateDouble(value)
|
||||
? Math.Max(value, sender.GetValue(MinimumProperty))
|
||||
: sender.GetValue(MinimumProperty);
|
||||
: sender.GetValue(MaximumProperty);
|
||||
}
|
||||
|
||||
private static double CoerceMinimum(AvaloniaObject sender, double value)
|
||||
{
|
||||
return ValidateDouble(value) ? value : sender.GetValue(MaximumProperty);
|
||||
return ValidateDouble(value) ? value : sender.GetValue(MinimumProperty);
|
||||
}
|
||||
|
||||
private static double CoerceLowerValue(AvaloniaObject sender, double value)
|
||||
|
||||
Reference in New Issue
Block a user