This is a migrated thread and some comments may be shown as answers.

Accessing all elements in a tooltip

1 Answer 30 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 25 Feb 2019, 02:19 PM

I have an application where I want to write tests to confirm the content of a ToolTip. If the ToolTip is simple text, all is fine, the checks in Step Builder work as expected.

If I add other elements e.g.

            <Polygon 
                        Points="16, 32 32, 32 24, 18"
                        Visibility="Visible"
                        ToolTipService.ShowDuration="360000" HorizontalAlignment="Right" Width="32">
                <Polygon.Fill>
                    <SolidColorBrush Color="Aqua"/>
                </Polygon.Fill>
                <Polygon.ToolTip>
                <StackPanel>
                    <TextBlock Text="Foo"/>
                    <Ellipse Width="20" Height="20" Fill="Pink"/>
                    <TextBlock Text="Bar"/>
                </StackPanel> 
            </Polygon.ToolTip>
            </Polygon>
What I see in the Visual Tree is a ToolTip "FooBar". How can I do a test on, say, the colour of the ellipse?

If my ToolTip is made of Runs e.g.

                    <TextBlock>
                        <Run Text="Foo"/>
                        <Run Text="Bar"/>
                    </TextBlock>

Then in the Visual Tree, the ToolTip is blank and any steps created in Step Builder to determine the content will fail.

If the tooltip is made up from WPF elements, how can these be accessed, either via Step Builder, or via a coded step?

 

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 28 Feb 2019, 09:33 AM
Hello Steve,

The current post duplicates another thread you have recently started in our forums. As the other one is suited under the correct product, I will kindly ask you to refer to the reply posted in it

Thank you in advance for your understanding. 

Regards,
Elena Tsvetkova
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ToolTip
Asked by
Steve
Top achievements
Rank 1
Answers by
Elena
Telerik team
Share this question
or