Silverlight 4: ToolTipService

I cannot scroll my scrollviewer, it disappears when I move the mouse. Is it because it was just a clue? If so, is there a way to scroll the text in my tooltip?

<TextBlock TextWrapping="Wrap" Style="{StaticResource TextBlockWidthStyle}" 
                                   Text="{Binding ExtendedDescription}"
                                   TextTrimming="WordEllipsis">
                                <ToolTipService.ToolTip>
                                    <ScrollViewer Width="310" VerticalScrollBarVisibility="Auto">
                                        <TextBlock Text="{Binding ExtendedDescription}"
                                                   Width="300"
                                                   TextWrapping="Wrap"/>    
                                    </ScrollViewer>
                                </ToolTipService.ToolTip>
                            </TextBlock>
+3
source share
2 answers

I think you are stretching the use of ToolTip beyond what is expected. It disappears because it is its design. It should not contain content that the user should interact with, such as a scroll bar.

I would suggest that you implement this function using Popup. Wrap it all in a UserControl or template user control.

+4

, , , !

0

Source: https://habr.com/ru/post/1749356/


All Articles