如何让下面代码中的Tooltip显示得更快?
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;
MainStackPanel.Children.Add(tb);
}
}
}
最佳答案
ToolTipService.SetInitialShowDelay(tb, 10);
关于c# - 如何使用 ToolTipService.Duration 使 WPF ToolTip 显示得更快?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1841956/