Skip to content

Commit aa3cfb7

Browse files
committed
Use DefaultListBoxStyle
1 parent 6ce0580 commit aa3cfb7

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

Flow.Launcher/Resources/SettingWindowStyle.xaml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,27 @@
362362

363363
<Style
364364
x:Key="PluginListStyle"
365-
BasedOn="{StaticResource {x:Type ListBox}}"
366-
TargetType="ListBox">
365+
BasedOn="{StaticResource DefaultListBoxStyle}"
366+
TargetType="{x:Type ListBox}">
367+
<Setter Property="BorderBrush" Value="Transparent" />
368+
<Setter Property="Background" Value="{DynamicResource Color01B}" />
369+
<Setter Property="Padding" Value="0 0 0 0" />
370+
<Setter Property="Template">
371+
<Setter.Value>
372+
<ControlTemplate TargetType="ListBox">
373+
<ui:ScrollViewerEx
374+
x:Name="ScrollViewer"
375+
AutoHideScrollBars="{TemplateBinding ui:ScrollViewerHelper.AutoHideScrollBars}"
376+
Focusable="false"
377+
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
378+
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
379+
KeyboardNavigation.TabNavigation="{TemplateBinding KeyboardNavigation.TabNavigation}"
380+
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
381+
<ItemsPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
382+
</ui:ScrollViewerEx>
383+
</ControlTemplate>
384+
</Setter.Value>
385+
</Setter>
367386
<Style.Triggers>
368387
<DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Items.Count}" Value="0">
369388
<Setter Property="Template">
@@ -385,20 +404,13 @@
385404
</Style.Triggers>
386405
</Style>
387406

388-
<Style x:Key="StoreListStyle" TargetType="{x:Type ListBox}">
407+
<Style
408+
x:Key="StoreListStyle"
409+
BasedOn="{StaticResource DefaultListBoxStyle}"
410+
TargetType="{x:Type ListBox}">
389411
<Setter Property="BorderBrush" Value="Transparent" />
390412
<Setter Property="Background" Value="{DynamicResource Color01B}" />
391-
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
392-
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
393413
<Setter Property="Padding" Value="0 0 0 0" />
394-
<Setter Property="IsTabStop" Value="False" />
395-
<Setter Property="KeyboardNavigation.TabNavigation" Value="Once" />
396-
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
397-
<Setter Property="ui:FocusVisualHelper.UseSystemFocusVisuals" Value="{DynamicResource UseSystemFocusVisuals}" />
398-
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
399-
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
400-
<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
401-
<Setter Property="ScrollViewer.PanningMode" Value="Both" />
402414
<Setter Property="Template">
403415
<Setter.Value>
404416
<ControlTemplate TargetType="ListBox">

0 commit comments

Comments
 (0)