Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverlight 4: ToolTipService

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>
                                    <ScrollViewer Width="310" VerticalScrollBarVisibility="Auto">
                                        <TextBlock Text="{Binding ExtendedDescription}"
                                                   Width="300"
                                                   TextWrapping="Wrap"/>    
                                    </ScrollViewer>
                                </ToolTipService.ToolTip>
                            </TextBlock>
like image 277
xscape Avatar asked Dec 03 '25 09:12

xscape


1 Answers

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.

like image 192
AnthonyWJones Avatar answered Dec 04 '25 23:12

AnthonyWJones



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!