From f04b52d0dbde2be3bbd1026b56f83f3b89f2b4bd Mon Sep 17 00:00:00 2001 From: MyDrift Date: Sun, 27 Oct 2024 12:59:40 +0100 Subject: [PATCH] ToggleButtonStyle animation - add hover animation to white dot - remove IsPressed trigger - improve some comments --- functions/public/Invoke-WPFUIApps.ps1 | 4 +- xaml/inputXML.xaml | 76 +++++++++++++++++++-------- 2 files changed, 56 insertions(+), 24 deletions(-) diff --git a/functions/public/Invoke-WPFUIApps.ps1 b/functions/public/Invoke-WPFUIApps.ps1 index fa48f37e..3b9cdfbb 100644 --- a/functions/public/Invoke-WPFUIApps.ps1 +++ b/functions/public/Invoke-WPFUIApps.ps1 @@ -315,12 +315,12 @@ function Invoke-WPFUIApps { $childCheckBox.isChecked = -not $childCheckbox.IsChecked }) $border.Add_MouseEnter({ - if (($sync.$($this.Tag).IsChecked) -eq $false){ + if (($sync.$($this.Tag).IsChecked) -eq $false) { $this.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "AppInstallHighlightedColor") } }) $border.Add_MouseLeave({ - if (($sync.$($this.Tag).IsChecked) -eq $false){ + if (($sync.$($this.Tag).IsChecked) -eq $false) { $this.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "AppInstallUnselectedColor") } }) diff --git a/xaml/inputXML.xaml b/xaml/inputXML.xaml index 8fec0231..e20470d8 100644 --- a/xaml/inputXML.xaml +++ b/xaml/inputXML.xaml @@ -357,41 +357,73 @@ CornerRadius="{DynamicResource ButtonCornerRadius}"> - - + + + + Width="8" Height="8" + Fill="{DynamicResource ButtonForegroundColor}" + HorizontalAlignment="Right" + VerticalAlignment="Top" + Margin="0,3,5,0" + RenderTransformOrigin="0.5,0.5"> + + + + - + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + +