/// <summary> /// Internal method for balloon creation /// </summary> /// <param name="msg">The MSG.</param> private void DisplayBalloon(IBalloonMessage msg) { _tbi.Dispatcher.Invoke(() => { if (_container == null) { _container = new BalloonContainer(); _tbi.ShowCustomBalloon(_container, PopupAnimation.None, null); _tbi.CustomBalloon.Closed += this.CustomBalloon_Closed; } _container.AddBalloon(msg); }); }
/// <summary> /// Handles the Closed event of the CustomBalloon control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void CustomBalloon_Closed(object sender, EventArgs e) { _container = null; }