Theme windows8 - Accent color

2 Answers 44 Views
General Discussions
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Deltaohm asked on 11 Sep 2023, 10:32 AM

Hi,
I use windows8 theme but I need to make more clear the accent color without change the header color.
In other themes (for instance, Visual studio 2019) this option is allowed.Thank you

Luigi

2 Answers, 1 is accepted

Sort by
0
Accepted
Masha
Telerik team
answered on 28 Mar 2024, 09:19 AM

Hi Deltaohm,

I guess the problem may lie within one of your custom styles. While the Windows8 theme utilizes paths for icons, our newer themes like VisualStudio2019 and Windows11 themes use RadGlyphs for icons. It appears there's a mismatch in styles when you set newer theme, but pinpointing the exact source of the issue is challenging.

To better assist you, could you please provide a demo project that showcases the problem? With access to a demonstration, I'll be able to closely examine the issue and offer a suitable solution.

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.

Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
commented on 02 Apr 2024, 03:12 PM

The problem about the exception is not a priority. I'm using Windows8 theme and I don't get any errors.
The question is about the color of funnel icon.

Thank you

Luigi

Stenly
Telerik team
commented on 05 Apr 2024, 11:58 AM

As you have noticed, the funnel icon, when a filter is applied, will use the accent color, which is also used by other elements.

To modify only the filter icon's color when a filter is applied, the default ControlTemplate of the FilteringDropDown element can be extracted and modified. More specifically, the second Path element's Fill property can be set to the desired value (currently, it uses the accent color of the Windows 8 theme).

The following code snippet shows what I have in mind:

<Application.Resources>
    <ControlTemplate TargetType="telerik:FilteringDropDown" x:Key="DistinctFilterControlTemplate">
        <Grid>
            <Button x:Name="PART_DropDownButton" AutomationProperties.Name="FilterDropDownButton">
                <Button.Template>
                    <ControlTemplate TargetType="Button">
                        <ContentPresenter/>
                    </ControlTemplate>
                </Button.Template>
                <Border Cursor="Hand" MinWidth="22" Background="Transparent">
                    <Grid>
                        <Path
                            Data="M0.93340254,0 L4.934082,0 L6.934082,0 L10.93358,0 C11.996876,0 12.199773,0.75 11.668063,1.359375 L8.4335356,5.5 C8.100522,5.8975558 7.983531,6.062263 7.9429321,6.2736206 L7.934082,6.3298788 L7.934082,10.332101 C7.934082,10.332101 3.9340818,14.997499 3.9340818,14.997499 L3.9340818,6.3293748 L3.9286206,6.3012671 C3.8825667,6.1045012 3.751812,5.9296875 3.3865709,5.5 L0.24589038,1.40625 C-0.2067349,0.84375 -0.066181421,1.2241071E-16 0.93340254,0 z"
                            Fill="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                            Stretch="Fill"
                            Margin="2 1 2 2"
                            Width="8"
                            Height="11"/>
                        <!--Set the Fill property of the following Path element to the desired value-->
                        <Path
                            Data="M0.93340254,0 L4.934082,0 L6.934082,0 L10.93358,0 C11.996876,0 12.199773,0.75 11.668063,1.359375 L8.4335356,5.5 C8.100522,5.8975558 7.983531,6.062263 7.9429321,6.2736206 L7.934082,6.3298788 L7.934082,10.332101 C7.934082,10.332101 3.9340818,14.997499 3.9340818,14.997499 L3.9340818,6.3293748 L3.9286206,6.3012671 C3.8825667,6.1045012 3.751812,5.9296875 3.3865709,5.5 L0.24589038,1.40625 C-0.2067349,0.84375 -0.066181421,1.2241071E-16 0.93340254,0 z"
                            Fill="Red"
                            Width="8"
                            Height="11"
                            Visibility="{TemplateBinding FunnelFillVisibility}"
                            Margin="2 1 2 2"
                            Stretch="Fill"/>
                    </Grid>
                </Border>
            </Button>
            <Popup x:Name="PART_DropDownPopup" StaysOpen="True" AllowsTransparency="True" PopupAnimation="Slide"/>
        </Grid>
    </ControlTemplate>
    <Style TargetType="telerik:FilteringDropDown">
        <Setter Property="Template" Value="{StaticResource DistinctFilterControlTemplate}"/>
    </Style>
</Application.Resources>

The produced result is as follows:

Could you give this suggestion a try?

 
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
commented on 19 Apr 2024, 08:37 AM

Yes, the suggestion works perfectly.
Thank you very much.
0
Masha
Telerik team
answered on 12 Sep 2023, 05:39 AM

Hello Deltaohm,

I'm afraid there is no easy way to achieve the desired approach, as the Windows 8 theme supports only five brushes. In contrast, Visual Studio 2019 offers a more expansive selection of brushes, making it more convenient for implementing color modifications.

To achieve the desired approach, it will be necessary to make modifications on a per-control basis. If you have any questions with this modification, we will be glad to assist you further.

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.

Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
commented on 27 Mar 2024, 02:22 PM | edited

Hi Masha,
thank you for your answer, I come back to the question because I need to highlight the funnel icon when I set a filter.
I attached a screenshot of your Color Theme Generator where you can see that the dark green of funnel in First Name and Last Name column is very similar to black and is almost impossible for a user to see the difference.

Since windows8 is the theme more suitable for my application I would know something about modifications on a per-control basis.
Or other solution.

For instance I can change the background color of header when filter is active or so on.

Thank you

Luigi

 

Incidentally, I tried to change the theme with visualstudio2019 and windows11, and I get this error:

targettype 'TextBlock' does not match type of element 'Path'. I don't know where but with windows8 I don't get the error

Tags
General Discussions
Asked by
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Answers by
Masha
Telerik team
Share this question
or