diff --git a/src/Uno.UI/Microsoft/UI/Xaml/Controls/RadioButtons/RadioButtons.cs b/src/Uno.UI/Microsoft/UI/Xaml/Controls/RadioButtons/RadioButtons.cs index b29b439dcc81..d3dd957202dc 100644 --- a/src/Uno.UI/Microsoft/UI/Xaml/Controls/RadioButtons/RadioButtons.cs +++ b/src/Uno.UI/Microsoft/UI/Xaml/Controls/RadioButtons/RadioButtons.cs @@ -75,6 +75,7 @@ ItemsRepeater GetRepeater() repeater.ElementClearing += OnRepeaterElementClearing; repeater.ElementIndexChanged += OnRepeaterElementIndexChanged; repeater.Loaded += OnRepeaterLoaded; + repeater.Unloaded += OnRepeaterUnloaded; return repeater; } return null; @@ -664,7 +665,7 @@ internal void SetTestHooksEnabled(bool enabled) } } - ~RadioButtons() + private void OnRepeaterUnloaded(object sender, RoutedEventArgs args) { var layout = GetLayout(); if (layout != null)