From 06aaaebdbc5c2b5e69ea3ab1868f7ec9d3cc90a9 Mon Sep 17 00:00:00 2001 From: amulware Date: Thu, 29 Oct 2015 11:27:03 +0100 Subject: [PATCH] Allow to show balloon tips with large icons. --- .../Source/NotifyIconWpf/TaskbarIcon.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Hardcodet.NotifyIcon.Wpf/Source/NotifyIconWpf/TaskbarIcon.cs b/Hardcodet.NotifyIcon.Wpf/Source/NotifyIconWpf/TaskbarIcon.cs index 884eedc..f0273e9 100644 --- a/Hardcodet.NotifyIcon.Wpf/Source/NotifyIconWpf/TaskbarIcon.cs +++ b/Hardcodet.NotifyIcon.Wpf/Source/NotifyIconWpf/TaskbarIcon.cs @@ -776,7 +776,6 @@ namespace Hardcodet.Wpf.TaskbarNotification } } - /// /// 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 /// The title to display on the balloon tip. /// The text to display on the balloon tip. /// A custom icon. + /// True to allow large icons (Windows Vista and later). /// If /// is a null reference. - 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); } }