I can't scroll to my scrollviewer, it disappear when I move the mouse. Was it because it was just a tooltip? If yes, is there a way to scroll the text in my tooltip?
<TextBlock TextWrapping="Wrap" Style="{StaticResource TextBlockWidthStyle}"
Text="{Binding ExtendedDescription}"
TextTrimming="WordEllipsis">
<ToolTipService.ToolTip>
<S开发者_JAVA百科crollViewer Width="310" VerticalScrollBarVisibility="Auto">
<TextBlock Text="{Binding ExtendedDescription}"
Width="300"
TextWrapping="Wrap"/>
</ScrollViewer>
</ToolTipService.ToolTip>
</TextBlock>
I think you are stretching the ToolTip usage outside of what it expected. Its disappearing because that is its design. Its not expected to contain any content with which the user has to interact such as a scrollbar.
I would suggest that you implement this functionality using a Popup
instead. Wrap it all upt in a UserControl or a templated custom control.
If you can, use line breaks to break up the description instead of having user to scroll on a tooltip!
精彩评论