mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-23 02:06:34 +08:00
Merge pull request #112 from irihitech/111-slider-tick-still-takes-place-when-invisible
Fix Slider default size
This commit is contained in:
@@ -62,6 +62,15 @@
|
|||||||
TickFrequency="10"
|
TickFrequency="10"
|
||||||
TickPlacement="TopLeft"
|
TickPlacement="TopLeft"
|
||||||
Value="0" />
|
Value="0" />
|
||||||
|
<Slider
|
||||||
|
Height="300"
|
||||||
|
IsSnapToTickEnabled="True"
|
||||||
|
Maximum="100"
|
||||||
|
Minimum="0"
|
||||||
|
Orientation="Vertical"
|
||||||
|
TickFrequency="10"
|
||||||
|
TickPlacement="Outside"
|
||||||
|
Value="0" />
|
||||||
<Slider
|
<Slider
|
||||||
Height="300"
|
Height="300"
|
||||||
Classes="ToolTip"
|
Classes="ToolTip"
|
||||||
@@ -71,6 +80,22 @@
|
|||||||
TickFrequency="10"
|
TickFrequency="10"
|
||||||
TickPlacement="TopLeft"
|
TickPlacement="TopLeft"
|
||||||
Value="0" />
|
Value="0" />
|
||||||
|
<Slider
|
||||||
|
Height="300"
|
||||||
|
IsDirectionReversed="True"
|
||||||
|
Maximum="100"
|
||||||
|
Minimum="0"
|
||||||
|
Orientation="Vertical"
|
||||||
|
TickFrequency="10"
|
||||||
|
Value="0" />
|
||||||
|
<Slider
|
||||||
|
Height="300"
|
||||||
|
IsEnabled="False"
|
||||||
|
Maximum="100"
|
||||||
|
Minimum="0"
|
||||||
|
Orientation="Vertical"
|
||||||
|
TickFrequency="10"
|
||||||
|
Value="30" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -88,12 +88,7 @@
|
|||||||
<Setter Property="ReservedSpace" Value="{Binding #PART_Track.Thumb.Bounds}" />
|
<Setter Property="ReservedSpace" Value="{Binding #PART_Track.Thumb.Bounds}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Grid.Styles>
|
</Grid.Styles>
|
||||||
<Grid x:Name="HorizontalTemplate" MinHeight="50">
|
<Grid x:Name="HorizontalTemplate" RowDefinitions="Auto,Auto,Auto">
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="15" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="15" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<TickBar
|
<TickBar
|
||||||
Name="TopTickBar"
|
Name="TopTickBar"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
@@ -177,15 +172,10 @@
|
|||||||
<Grid
|
<Grid
|
||||||
x:Name="VerticalTemplate"
|
x:Name="VerticalTemplate"
|
||||||
MinWidth="{DynamicResource SliderVerticalWidth}"
|
MinWidth="{DynamicResource SliderVerticalWidth}"
|
||||||
RowDefinitions="*,Auto,Auto">
|
ColumnDefinitions="Auto,Auto,Auto">
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="{DynamicResource SliderPreContentMargin}" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="{DynamicResource SliderPostContentMargin}" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<TickBar
|
<TickBar
|
||||||
Name="LeftTickBar"
|
Name="LeftTickBar"
|
||||||
Grid.RowSpan="3"
|
Grid.Column="0"
|
||||||
Width="{DynamicResource SliderTickVerticalWidth}"
|
Width="{DynamicResource SliderTickVerticalWidth}"
|
||||||
Margin="0,0,4,0"
|
Margin="0,0,4,0"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
@@ -199,7 +189,6 @@
|
|||||||
Ticks="{TemplateBinding Ticks}" />
|
Ticks="{TemplateBinding Ticks}" />
|
||||||
<TickBar
|
<TickBar
|
||||||
Name="RightTickBar"
|
Name="RightTickBar"
|
||||||
Grid.RowSpan="3"
|
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
Width="{DynamicResource SliderTickVerticalWidth}"
|
Width="{DynamicResource SliderTickVerticalWidth}"
|
||||||
Margin="4,0,0,0"
|
Margin="4,0,0,0"
|
||||||
@@ -214,9 +203,7 @@
|
|||||||
Ticks="{TemplateBinding Ticks}" />
|
Ticks="{TemplateBinding Ticks}" />
|
||||||
<Track
|
<Track
|
||||||
Name="PART_Track"
|
Name="PART_Track"
|
||||||
Grid.RowSpan="3"
|
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Grid.ColumnSpan="1"
|
|
||||||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
|
IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
|
||||||
Maximum="{TemplateBinding Maximum}"
|
Maximum="{TemplateBinding Maximum}"
|
||||||
Minimum="{TemplateBinding Minimum}"
|
Minimum="{TemplateBinding Minimum}"
|
||||||
|
|||||||
Reference in New Issue
Block a user