开发者

How can I make a WPF ToolTip appear faster with ToolTipService.Duration?

How can I make the Tooltip in the following code display faster?

using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;

namespace TestHover29282
{
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();

            TextBlock tb = new TextBlock();
            tb.Text = "Jim Smith";

            ToolTip tt = new ToolTip();
            tt.Content = "This is some info on the customer.";

            tb.ToolTip = tt;

            //ToolTipService tts = new ToolTipService();
            //tts.Duration = 0;
            //tb.ToolTipService = tts;

            MainSta开发者_如何转开发ckPanel.Children.Add(tb); 
        }
    }
}


ToolTipService.SetInitialShowDelay(tb, 10);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜