Declined
Last Updated: 15 Jun 2022 06:35 by ADMIN
Eldoir
Created on: 08 Jun 2022 10:11
Category: UI for WPF
Type: Bug Report
4
GridViewColumn Header and Tooltip share the same style

Hello,

When I do the following:

and I assign this style to my dynamically created columns from a behavior attached to the RadGridView, the style of the tooltip is the same as the style of the header.

They seem to share the same style, so that when I change one property on the header, the tooltip gets the same, and vice-versa.

Do you repro? I'm on version 2020.3.1020.45.

Thanks,

Arthur

2 comments
Eldoir
Posted on: 14 Jun 2022 13:36

Hello Masha,

You're right, that was on my side, because of one of my other styles, waaaay above in my resources.

Thanks!

ADMIN
Masha
Posted on: 14 Jun 2022 12:01

Hello Eldoir,

Thank you for contacting us.

I was not able to reproduce the described problem on my side.  Can you confirm you have ToolTip's value set to your GridViewDataColumn definition? ToolTip and GridViewHeaderCell can not share the same style as they have different TargetType. I attached a sample image of what the tooltip looks like when I apply the provided code snippet:

<Style x:Key="CustomHeaderCellStyle" TargetType="{x:Type telerik:GridViewHeaderCell}" BasedOn="{StaticResource GridViewHeaderCellStyle}">
    <Setter Property="ToolTip" Value="{Binding Column.ToolTip, RelativeSource={RelativeSource Self}}" />
 </Style>

Also the below I provided the ToolTip style which you can modify as you wish:

<Style TargetType="ToolTip">
                <Setter Property="FontFamily" Value="{telerik:VisualStudio2019Resource ResourceKey=FontFamily}"/>
                <Setter Property="FontSize" Value="{telerik:VisualStudio2019Resource ResourceKey=FontSize}"/>
                <Setter Property="Foreground" Value="{telerik:VisualStudio2019Resource ResourceKey=MarkerBrush}"/>
                <Setter Property="Background" Value="{telerik:VisualStudio2019Resource ResourceKey=AlternativeBrush}"/>
                <Setter Property="BorderBrush" Value="{telerik:VisualStudio2019Resource ResourceKey=BasicBrush}"/>
                <Setter Property="Padding" Value="3"/>
                <Setter Property="BorderThickness" Value="1"/>
                <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
                <Setter Property="SnapsToDevicePixels" Value="True"/>
                <Setter Property="UseLayoutRounding" Value="True"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ToolTip">
                            <Grid>
                                <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                                    <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                </Border>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
</Style>

It would be a great help if you provide a sample project where the problem is demonstrated?

I look forward to receiving your reply. 

Regards,
Masha
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Attached Files: