mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-24 23:11:31 -06:00
Style for Hidden Checkbox but visible Content
This commit is contained in:
parent
8d34e2fa30
commit
ba968d0cb3
@ -284,6 +284,7 @@ function Invoke-WPFUIApps {
|
||||
$checkBox.HorizontalAlignment = "Left"
|
||||
$checkBox.VerticalAlignment = "Center"
|
||||
$checkBox.Margin = New-Object Windows.Thickness(5, 0, 10, 0)
|
||||
$checkBox.SetResourceReference([Windows.Controls.Control]::StyleProperty, "CollapsedCheckBoxStyle")
|
||||
$checkbox.Add_Checked({
|
||||
Invoke-WPFSelectedLabelUpdate -type "Add" -checkbox $this
|
||||
$borderElement = $this.Parent.Parent
|
||||
|
@ -366,6 +366,19 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<!-- Collapsed Checkbox Style -->
|
||||
<Style x:Key="CollapsedCheckBoxStyle" TargetType="CheckBox">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="CheckBox">
|
||||
<ContentPresenter Content="{TemplateBinding Content}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="{TemplateBinding Padding}"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="RadioButton">
|
||||
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource MainBackgroundColor}"/>
|
||||
@ -864,7 +877,6 @@
|
||||
</Border>
|
||||
</Popup>
|
||||
|
||||
|
||||
<Button Name="SettingsButton"
|
||||
Style="{StaticResource HoverButtonStyle}"
|
||||
Grid.Column="3" BorderBrush="Transparent"
|
||||
|
Loading…
Reference in New Issue
Block a user