public bool?AbrirDialog(UserControl userControl, bool isFullScreen = false, bool isNoBorder = false) { var defaultWindow = new AbstractWindow(); defaultWindow.Content = userControl; defaultWindow.ShowInTaskbar = false; if (isFullScreen) { defaultWindow.WindowState = WindowState.Maximized; } else { defaultWindow.SizeToContent = SizeToContent.WidthAndHeight; defaultWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen; } if (isNoBorder) { defaultWindow.BorderThickness = new Thickness(0); defaultWindow.WindowStyle = WindowStyle.None; defaultWindow.ResizeMode = ResizeMode.NoResize; } var confirma = defaultWindow.ShowDialog(); return(userControl is AbstractUserControl ? (userControl as AbstractUserControl).InConfirmado : confirma ); }
public static void MinimizarApp(this object obj) { if (CurrentWindow == null) { return; } CurrentWindow.ShowInTaskbar = false; CurrentWindow.Hide(); IsActiveApp = false; if (AbstractWindow != null) { AbstractWindow.SetarNotifyIcon(); AbstractWindow.NotifyIcon.Ativo = true; } }