Skip to content

Commit da12a06

Browse files
committed
Add style for toggle button
1 parent 52b3579 commit da12a06

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Flow.Launcher/SettingWindow.xaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
</CollectionViewSource.SortDescriptions>
3838
</CollectionViewSource>
3939

40-
4140
<Style x:Key="SettingGrid" TargetType="ItemsControl">
4241
<Setter Property="Focusable" Value="False" />
4342
<Setter Property="Margin" Value="0" />
@@ -188,6 +187,13 @@
188187
</Setter>
189188
</Style>
190189

190+
<!-- Plugin Store Item when Selected layout for nothing-->
191+
<Style x:Key="StoreItem" TargetType="{x:Type ToggleButton}">
192+
<Style.Triggers>
193+
<Trigger Property="IsChecked" Value="True">
194+
</Trigger>
195+
</Style.Triggers>
196+
</Style>
191197

192198
<Style x:Key="PluginList" TargetType="ListBoxItem">
193199
<Setter Property="Background" Value="#ffffff" />
@@ -911,14 +917,14 @@
911917

912918
<ToggleButton IsChecked="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}},Path=IsSelected}" Background="Transparent"
913919
Width="{Binding ActualWidth,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}}}"
914-
HorizontalAlignment="Left" HorizontalContentAlignment="left">
920+
HorizontalAlignment="Left" HorizontalContentAlignment="left" Style="{StaticResource StoreItem}">
915921
<ToggleButton.Template>
916922
<ControlTemplate TargetType="{x:Type ButtonBase}">
917923
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
918924
<ControlTemplate.Triggers/>
919925
</ControlTemplate>
920926
</ToggleButton.Template>
921-
927+
922928
<Grid HorizontalAlignment="Left" VerticalAlignment="Stretch">
923929
<Grid.ColumnDefinitions>
924930
<ColumnDefinition Width="72"/>

0 commit comments

Comments
 (0)