Reputation: 38114
I have a texbox. I would like to show a tooltip when a user brings a mouse on the Textbox. I write such code, but my program just breaks and VS 2010 gives a window of report. This is my xaml-code:
<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!"/>
Why does not a tooltip work in WPF 2010? How to resolve it?
Upvotes: 0
Views: 81
Reputation: 13017
There is nothing wrong with that piece of XAML. Maybe the problem is in one of the event handlers instead (Student_textBox_GotFocus/Student_textBox_LostFocus/Student_textBox_KeyDown)?
What does the error report say? Can you post the error message and possibly a stack trace?
Upvotes: 1