fix closing flyout a last time
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using Telerik.WinControls;
|
using System.Runtime.CompilerServices;
|
||||||
|
using Telerik.WinControls;
|
||||||
using Telerik.WinControls.Svg;
|
using Telerik.WinControls.Svg;
|
||||||
using Telerik.WinControls.UI;
|
using Telerik.WinControls.UI;
|
||||||
using Telerik.WinControls.UI.SplashScreen;
|
using Telerik.WinControls.UI.SplashScreen;
|
||||||
@@ -115,14 +116,6 @@ partial class RadFlyoutBase
|
|||||||
if (throwOnError && ParentContext is null)
|
if (throwOnError && ParentContext is null)
|
||||||
throw new NullReferenceException(nameof(ParentContext));
|
throw new NullReferenceException(nameof(ParentContext));
|
||||||
|
|
||||||
if (ParentContext is null)
|
|
||||||
TryCloseFlyout();
|
|
||||||
else
|
|
||||||
ParentContext.BeginInvoke(TryCloseFlyout);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void TryCloseFlyout()
|
|
||||||
{
|
|
||||||
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();
|
||||||
|
|||||||
Reference in New Issue
Block a user