public void InitTray() { _tray = Application.Current.FindResource("TrayIcon") as TaskbarIcon; _trayViewModel = new TaskbarIconViewModel(this, Settings, DialogService.Instance); _tray.DataContext = _trayViewModel; TaskbarIcon.SetParentTaskbarIcon(Application.Current.MainWindow, _tray); }
public void InitTray() { tray = Application.Current.FindResource("TrayIcon") as TaskbarIcon; var trayViewModel = new TrayViewModel(); tray.DataContext = trayViewModel; TaskbarIcon.SetParentTaskbarIcon(Application.Current.MainWindow, tray); commonService = CommonService.GetInstance(); }
public void InitTray() { var ui = new UIServicesDefaults(); _tray = Application.Current.FindResource("TrayIcon") as TaskbarIcon; var vm = new TaskbarIconViewModel(this, ui); _tray.DataContext = vm; TaskbarIcon.SetParentTaskbarIcon(Application.Current.MainWindow, _tray); }