From 44024076ae3a3bbc616ff7982afbbd1337315d12 Mon Sep 17 00:00:00 2001 From: Lester Botello Date: Mon, 7 Aug 2023 11:32:14 -0400 Subject: [PATCH 1/2] fix: Fix AlternateContent for ToogleButton crashing on UWP when not set --- .../Styles/Controls/v2/ToggleButton.xaml | 2 +- .../Extensions/ControlExtensionsSamplePage.xaml | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/library/Uno.Material/Styles/Controls/v2/ToggleButton.xaml b/src/library/Uno.Material/Styles/Controls/v2/ToggleButton.xaml index 6c1f19859..38ea9bba1 100644 --- a/src/library/Uno.Material/Styles/Controls/v2/ToggleButton.xaml +++ b/src/library/Uno.Material/Styles/Controls/v2/ToggleButton.xaml @@ -605,7 +605,7 @@ - + @@ -137,6 +137,20 @@ + + + + + + + + + + + From d8553c7be829aa84c22da8001f16cf88eb2a5968 Mon Sep 17 00:00:00 2001 From: Lester Botello Date: Wed, 9 Aug 2023 08:15:45 -0400 Subject: [PATCH 2/2] fix: Adjusts opacity instead of visibility --- .../Styles/Application/Common/Converters.xaml | 4 +++ .../Styles/Controls/v2/ToggleButton.xaml | 35 +++++++++---------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/library/Uno.Material/Styles/Application/Common/Converters.xaml b/src/library/Uno.Material/Styles/Application/Common/Converters.xaml index abc785eb3..2c3b90773 100644 --- a/src/library/Uno.Material/Styles/Application/Common/Converters.xaml +++ b/src/library/Uno.Material/Styles/Application/Common/Converters.xaml @@ -36,6 +36,10 @@ NotNullValue="Visible" NullValue="Collapsed" /> + + diff --git a/src/library/Uno.Material/Styles/Controls/v2/ToggleButton.xaml b/src/library/Uno.Material/Styles/Controls/v2/ToggleButton.xaml index 38ea9bba1..9d598b920 100644 --- a/src/library/Uno.Material/Styles/Controls/v2/ToggleButton.xaml +++ b/src/library/Uno.Material/Styles/Controls/v2/ToggleButton.xaml @@ -457,9 +457,6 @@ - - - @@ -473,9 +470,9 @@ - + - + @@ -484,9 +481,9 @@ - + - + @@ -495,19 +492,21 @@ - + - + + + - + - + @@ -515,9 +514,9 @@ - + - + @@ -526,9 +525,9 @@ - + - + @@ -537,9 +536,9 @@ - + - + @@ -609,7 +608,7 @@ Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" - Visibility="Collapsed" /> + Opacity="0"/>