示例#1
0
 /// <summary>
 /// Sets the ParentTaskbarIcon property.  This dependency property 
 /// indicates ....
 /// </summary>
 public static void SetParentTaskbarIcon(DependencyObject d, WPFNotifyIcon value)
 {
     d.SetValue(ParentTaskbarIconProperty, value);
 }
示例#2
0
        private void InitializeWPFNotifyIcon()
        {
            var startIcon = new Icon(@"Icons\emotion-7.ico");
            var notifyIcon = new Icon(@"Icons\emotion-14.ico");

            _notifyIcon = new WPFNotifyIcon(startIcon, notifyIcon, MsgSinkOnMouseEventReceived);

            var miExit = new MenuItem { Header = "Exit" };
            miExit.Click += MiExitOnClick;

            var miHelp = new MenuItem { Header = "Help" };
            miHelp.Click += MiSayHelloOnClick;

            _notifyIcon.AddContextMenuItem(miHelp)
                       .AddContextMenuItem(miExit);

            _notifyIcon.IconRemoved += NotifyIconOnIconRemoved;
        }