private void LoadTaskbarIcon(TrayIconViewModel trayVm) { trayVm.OnExitApplication += (s, e) => Application.Current.Shutdown(); _tb.DataContext = trayVm; _tb?.BringIntoView(); }
private void LoadTaskbarIcon(TrayIconViewModel trayVm, AuthenticationDialog authDialog) { trayVm.OnExitApplication += (s, e) => Application.Current.Shutdown(); trayVm.OnAuthenticationRequested += (s, e) => authDialog.Show(); _tb.DataContext = trayVm; _tb?.BringIntoView(); }