Click here to Skip to main content
15,894,180 members
Articles / Desktop Programming / WPF

WPF/XAML NotifyIcon and Taskbar (System Tray) Popup Window

Rate me:
Please Sign up or sign in to vote.
4.90/5 (77 votes)
4 Nov 2015CPOL14 min read 290.6K   18.6K   257  
Integrating WPF and XAML with the Windows forms NotifyIcon control to produce a slick, styled popup window when the mouse is moved over the NotifyIcon
//-------------------------------------------------------------------------------------
// Author:   Murray Foxcroft - April 2009
// Comments: A simple class that Inherits from ToggleButton and adds a few properties.
//           These properties are used to pass values to a control template and add 
//           some flexibility to allow for re-use of the control templates. See 
//           SlickButtonRD.xaml. 
//-------------------------------------------------------------------------------------
using System.Windows.Controls.Primitives;

namespace WpfXamlPopup
{
    public class SlickToggleButton : ToggleButton
    {
        // Property to hold a Corner Radius (button's dont have this property)
        private string cornerRadius;
        public string CornerRadius
        {
            get { return cornerRadius; }
            set { cornerRadius = value; }
        }

        // Property to hold the colour for the background highlighting (on mouse over)
        private string highlightBackground;
        public string HighlightBackground
        {
            get { return highlightBackground; }
            set { highlightBackground = value; }
        }

        // Property to hold the background colour applied when the button is in the pressed state
        private string pressedBackground;
        public string PressedBackground
        {
            get { return pressedBackground; }
            set { pressedBackground = value; }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
United Kingdom United Kingdom
You can read more about me here:

http://uk.linkedin.com/in/murrayfoxcroft

Comments and Discussions