public virtual IDisposable ShowDialog() { var disabled = s_instances.Where(x => x != this && x.IsEnabled).ToList(); WindowImpl activated = null; foreach (var window in disabled) { if (window._isActive) { activated = window; } window.IsEnabled = false; } Show(); return(Disposable.Create(() => { foreach (var window in disabled) { window.IsEnabled = true; } activated?.Activate(); })); }
public void ShowDialog(IWindowImpl parent) { _parent = (WindowImpl)parent; _parent._disabledBy.Add(this); _parent.UpdateEnabled(); SetWindowLongPtr(_hwnd, (int)WindowLongParam.GWL_HWNDPARENT, ((WindowImpl)parent)._hwnd); ShowWindow(_showWindowState); }
public void Hide() { if (_parent != null) { _parent._disabledBy.Remove(this); _parent.UpdateEnabled(); _parent = null; } UnmanagedMethods.ShowWindow(_hwnd, UnmanagedMethods.ShowWindowCommand.Hide); }
public Win32StorageProvider(WindowImpl windowImpl) { _windowImpl = windowImpl; }
public Win32NativeControlHost(WindowImpl window) { Window = window; }
public Win32NativeControlHost(WindowImpl window, bool useLayeredWindow) { _useLayeredWindow = useLayeredWindow; Window = window; }