From ef9455c6dae2e98415f63775a3e5df2ced86021f Mon Sep 17 00:00:00 2001 From: rabbitism Date: Fri, 24 Feb 2023 00:16:58 +0800 Subject: [PATCH] fix: make content invisible when content is null. --- src/Semi.Avalonia/Controls/ToggleSwitch.axaml | 47 +++++++++---------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/src/Semi.Avalonia/Controls/ToggleSwitch.axaml b/src/Semi.Avalonia/Controls/ToggleSwitch.axaml index 792ed36..f7da317 100644 --- a/src/Semi.Avalonia/Controls/ToggleSwitch.axaml +++ b/src/Semi.Avalonia/Controls/ToggleSwitch.axaml @@ -30,6 +30,8 @@ VerticalAlignment="Top" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" + IsVisible="{TemplateBinding Content, + Converter={x:Static ObjectConverters.IsNotNull}}" RecognizesAccessKey="True" /> @@ -151,36 +148,33 @@ - + - + CornerRadius="3" + Cursor="Hand"> + - +