public static void CloseWindow(int index) { CoreWindow cw = DXInteropApp.WindowList[index]; var nowait = cw.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { cw.Close(); }); }
protected override void Dispose(bool disposeManagedResources) { if (disposeManagedResources) { if (CoreWindow != null) { CoreWindow.Close(); CoreWindow = null; } } base.Dispose(disposeManagedResources); }
public void CloseModel() { if (DataModel is null) { return; } DataModel = null; var task = Dispatcher.RunAsync(CoreDispatcherPriority.Low, () => { _window.Close(); }); }
public void Close() { _window.Close(); }
private void TryCloseWindow() { CoreWindow window = CoreWindow.GetForCurrentThread(); window?.Close(); }