我有一个texbox。当用户将鼠标放在文本框上时,我想显示一个工具提示。我写了这样的代码,但我的程序刚刚中断,VS 2010 给出了一个报告窗口。这是我的 xaml 代码:
<TextBox Height="21" HorizontalAlignment="Left" Margin="231,17,0,0"
Name="Student_textBox" VerticalAlignment="Top" Width="123"
GotFocus="Student_textBox_GotFocus" LostFocus="Student_textBox_LostFocus"
TabIndex="1"
KeyDown="Student_textBox_KeyDown" ToolTip="Hello, Student!"/>
为什么工具提示在 WPF 2010 中不起作用?如何解决?