From 84a3d9ca1f609d50b53f7878fbe327399ee21d92 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Mon, 11 Jul 2022 17:29:13 +0200 Subject: [PATCH] Use theme default CornerRadius. When "Rounded" checkbox isn't checked. --- samples/ControlCatalog/ViewModels/ExpanderPageViewModel.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/ControlCatalog/ViewModels/ExpanderPageViewModel.cs b/samples/ControlCatalog/ViewModels/ExpanderPageViewModel.cs index 18511a6071..aa7f710ee0 100644 --- a/samples/ControlCatalog/ViewModels/ExpanderPageViewModel.cs +++ b/samples/ControlCatalog/ViewModels/ExpanderPageViewModel.cs @@ -5,10 +5,10 @@ namespace ControlCatalog.ViewModels { public class ExpanderPageViewModel : ViewModelBase { - private CornerRadius _cornerRadius; + private object _cornerRadius = AvaloniaProperty.UnsetValue; private bool _rounded; - public CornerRadius CornerRadius + public object CornerRadius { get => _cornerRadius; private set => RaiseAndSetIfChanged(ref _cornerRadius, value); @@ -20,7 +20,7 @@ namespace ControlCatalog.ViewModels set { if (RaiseAndSetIfChanged(ref _rounded, value)) - CornerRadius = _rounded ? new CornerRadius(25) : default; + CornerRadius = _rounded ? new CornerRadius(25) : AvaloniaProperty.UnsetValue; } } }