2

I am developing WPF application and need to create popup like in Skype - when you click on tray icon it appears with centric horizontal alignment in relation to the icon (like in attached image). Do you know how to do this? Please, help. Skype example image

Vitalii Kulyk
  • 41
  • 2
  • 6
  • 1
    Show the work you've done so far – Hemi81 Jan 17 '17 at 18:28
  • Look on the https://www.codeproject.com/Articles/36468/WPF-NotifyIcon - you may implement your notification using this framework. – VitaliyK Jan 17 '17 at 18:30
  • @developer_117 i used library wpf-notifyicon by hardcodet [link](https://www.codeproject.com/Articles/36468/WPF-NotifyIcon) , but horizontal alignment is not as i want. skype variant is exactly what i want. – Vitalii Kulyk Jan 17 '17 at 18:36
  • @VitaliyK, thank you, I already use this library, but horizontal alignment is not as i want. Maybe you know how to make popup with centric horizontal alignment in relation to the icon. – Vitalii Kulyk Jan 17 '17 at 18:43
  • The horizontal alignment is a part of implementation - I guess you will need to get a position of your tray icon in a tray(for ex as described here http://stackoverflow.com/questions/4366449/determining-location-of-tray-icon) and than calculate your alignment relatively to this coordinates. – VitaliyK Jan 17 '17 at 18:47

1 Answers1

3

You can use System.Windows.Forms.NotifyIcon to show notification balloon.

var notifyIcon = new System.Windows.Forms.NotifyIcon
    {
        Visible = true,
        Icon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location),
        Text = Title
    };

    notifyIcon.ShowBalloonTip(1, "Hello World", "Description message", System.Windows.Forms.ToolTipIcon.Info);
Amit Pawar
  • 31
  • 2