ensure the flyout is closed before opening a new one
This commit is contained in:
@@ -101,14 +101,23 @@ partial class RadFlyoutBase
|
||||
titleToAssing = title;
|
||||
iconToAssign = icon;
|
||||
ParentContext = controlToAssociate;
|
||||
CloseFlyout(false); // Ensure it's closed!
|
||||
RadFlyoutManager.Show(controlToAssociate, flyoutContentType);
|
||||
}
|
||||
|
||||
protected static void CloseFlyout()
|
||||
{
|
||||
if (ParentContext == null)
|
||||
CloseFlyout(true);
|
||||
}
|
||||
|
||||
protected static void CloseFlyout(bool throwOnError)
|
||||
{
|
||||
if (throwOnError && ParentContext is null)
|
||||
throw new NullReferenceException(nameof(ParentContext));
|
||||
|
||||
ParentContext.BeginInvoke(RadFlyoutManager.Close);
|
||||
if (ParentContext is null)
|
||||
RadFlyoutManager.Close();
|
||||
else
|
||||
ParentContext.BeginInvoke(RadFlyoutManager.Close);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user