Allow to show balloon tips with large icons.

This commit is contained in:
amulware
2015-10-29 11:27:03 +01:00
parent 13cd4b1728
commit 06aaaebdbc

View File

@@ -776,7 +776,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
}
}
/// <summary>
/// Displays a balloon tip with the specified title,
/// text, and a custom icon in the taskbar for the specified time period.
@@ -784,15 +783,21 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <param name="title">The title to display on the balloon tip.</param>
/// <param name="message">The text to display on the balloon tip.</param>
/// <param name="customIcon">A custom icon.</param>
/// <param name="largeIcon">True to allow large icons (Windows Vista and later).</param>
/// <exception cref="ArgumentNullException">If <paramref name="customIcon"/>
/// is a null reference.</exception>
public void ShowBalloonTip(string title, string message, Icon customIcon)
public void ShowBalloonTip(string title, string message, Icon customIcon, bool largeIcon = false)
{
if (customIcon == null) throw new ArgumentNullException("customIcon");
lock (this)
{
ShowBalloonTip(title, message, BalloonFlags.User, customIcon.Handle);
var flags = BalloonFlags.User;
if (largeIcon)
flags |= BalloonFlags.LargeIcon;
ShowBalloonTip(title, message, flags, customIcon.Handle);
}
}