enhance: Optimized the ScrollViewer style.

This commit is contained in:
NaBian committed 2024-07-27 21:32:20 +08:00
1 parent 17c2b8473b
commit 51f07648ee
16 files changed
+458 -235

No files matched your search

@@ -79,7 +79,7 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ScrollBarBaseThumbHorizontal" TargetType="Thumb">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="IsTabStop" Value="false"/>
@@ -176,10 +176,9 @@
<Style.Triggers>
<Trigger Property="Orientation" Value="Horizontal">
<Setter Property="Width" Value="Auto"/>
<Setter Property="MinWidth" Value="0"/>
<Setter Property="MinWidth" Value="8"/>
<Setter Property="Height" Value="8"/>
<Setter Property="MinHeight" Value="8"/>
<Setter Property="BorderThickness" Value="0,1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ScrollBar">
@@ -391,7 +390,7 @@
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style x:Key="ScrollViewerBaseStyle" TargetType="hc:ScrollViewer">
<Setter Property="VerticalScrollBarVisibility" Value="{Binding Path=(hc:ScrollViewer.VerticalScrollBarVisibility),RelativeSource={RelativeSource TemplatedParent}}" />
<Setter Property="Focusable" Value="False"/>
@@ -2145,10 +2145,9 @@
<Style.Triggers>
<Trigger Property="Orientation" Value="Horizontal">
<Setter Property="Width" Value="Auto" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="MinWidth" Value="8" />
<Setter Property="Height" Value="8" />
<Setter Property="MinHeight" Value="8" />
<Setter Property="BorderThickness" Value="0,1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ScrollBar">
@@ -10839,8 +10838,8 @@
<RowDefinition x:Name="RowDefinition0" Height="Auto" />
<RowDefinition x:Name="RowDefinition1" Height="*" />
</Grid.RowDefinitions>
<TabPanel x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" />
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" Grid.Row="1">
<TabPanel x:Name="headerPanel" Background="Transparent" IsItemsHost="true" Margin="0" Grid.Row="0" />
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Row="1">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>