コード例 #1
0
 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);
 }
コード例 #2
0
        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();
        }
コード例 #3
0
ファイル: BgInfoManager.cs プロジェクト: zodiacon/BgInfo
        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);
        }