just forget it, back to roots but better

This commit is contained in:
Pilzinsel64
2025-04-09 16:34:16 +02:00
parent 267618ccc5
commit 8a31685ccf

View File

@@ -102,20 +102,12 @@ partial class RadFlyoutBase
titleToAssing = title; titleToAssing = title;
iconToAssign = icon; iconToAssign = icon;
ParentContext = controlToAssociate; ParentContext = controlToAssociate;
CloseFlyout(false); // Ensure it's closed! CloseFlyout(); // Ensure it's closed!
RadFlyoutManager.Show(controlToAssociate, flyoutContentType); RadFlyoutManager.Show(controlToAssociate, flyoutContentType);
} }
protected static void CloseFlyout() protected static void CloseFlyout()
{ {
CloseFlyout(true);
}
protected static void CloseFlyout(bool throwOnError)
{
if (throwOnError && ParentContext is null)
throw new NullReferenceException(nameof(ParentContext));
if (typeof(RadFlyoutManager).GetField("flyoutInstance", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static).GetValue(null) is FlyoutScreen instance if (typeof(RadFlyoutManager).GetField("flyoutInstance", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static).GetValue(null) is FlyoutScreen instance
&& instance.IsActive) && instance.IsActive)
RadFlyoutManager.Close(); RadFlyoutManager.Close();