@@ -34,10 +34,6 @@ public class NotifyIcon : FrameworkElement, IDisposable
3434
3535 private IconHandle _iconHandle ;
3636
37- private const int WmTrayMouseMessage = InteropValues . WM_USER + 1024 ;
38-
39- private const int NIN_BALLOONUSERCLICK = InteropValues . WM_USER + 1025 ;
40-
4137 private string _windowClassName ;
4238
4339 private int _wmTaskbarCreated ;
@@ -494,7 +490,7 @@ private void UpdateIcon(bool showIconInTray, bool isTransparent = false)
494490 _isTransparent = isTransparent ;
495491 var data = new InteropValues . NOTIFYICONDATA
496492 {
497- uCallbackMessage = WmTrayMouseMessage ,
493+ uCallbackMessage = InteropValues . WM_TRAYMOUSEMESSAGE ,
498494 uFlags = InteropValues . NIF_MESSAGE | InteropValues . NIF_ICON | InteropValues . NIF_TIP ,
499495 hWnd = _messageWindowHandle ,
500496 uID = _id ,
@@ -577,8 +573,8 @@ private IntPtr Callback(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam)
577573 _dispatcherTimerPos . Start ( ) ;
578574 }
579575 break ;
580- case NIN_BALLOONUSERCLICK :
581- RaiseEvent ( new RoutedEventArgs ( BalloonTipClickedEvent ) ) ;
576+ case InteropValues . NIN_BALLOONUSERCLICK :
577+ RaiseEvent ( new RoutedEventArgs ( BalloonTipClickEvent ) ) ;
582578 break ;
583579 }
584580 }
@@ -676,13 +672,14 @@ public event RoutedEventHandler MouseDoubleClick
676672 remove => RemoveHandler ( MouseDoubleClickEvent , value ) ;
677673 }
678674
679- public static readonly RoutedEvent BalloonTipClickedEvent =
680- EventManager . RegisterRoutedEvent ( "BalloonTipClicked" , RoutingStrategy . Bubble , typeof ( RoutedEventHandler ) , typeof ( NotifyIcon ) ) ;
675+ public static readonly RoutedEvent BalloonTipClickEvent =
676+ EventManager . RegisterRoutedEvent ( "BalloonTipClick" , RoutingStrategy . Bubble , typeof ( RoutedEventHandler ) ,
677+ typeof ( NotifyIcon ) ) ;
681678
682- public event RoutedEventHandler BalloonTipClicked
679+ public event RoutedEventHandler BalloonTipClick
683680 {
684- add { AddHandler ( BalloonTipClickedEvent , value ) ; }
685- remove { RemoveHandler ( BalloonTipClickedEvent , value ) ; }
681+ add => AddHandler ( BalloonTipClickEvent , value ) ;
682+ remove => RemoveHandler ( BalloonTipClickEvent , value ) ;
686683 }
687684
688685 private void UpdateDataContext ( FrameworkElement target , object oldValue , object newValue )
0 commit comments