In this example I'll demonstrate how to add a ToolTip to a TextBox.
The ToolTip should be colored and italic.
Code snippet
Code Snippet
- <TextBox x:Name="SampleText"
- TextWrapping="Wrap">
- <TextBox.ToolTip>
- <TextBlock>
- <Italic Foreground="Red">Instructions: </Italic> Type here to change the preview text.
- </TextBlock>
- </TextBox.ToolTip>
- The quick brown fox jumps over the lazy dog.
- </TextBox>
Result
Sources
No comments:
Post a Comment