How to style dropdowns with options on the toolbar

1 Answer 50 Views
ImageEditor
René
Top achievements
Rank 1
Iron
René asked on 01 Dec 2023, 12:49 PM

My app does not have a dark theme, only light theme. My PC is running with dark theme, and that creates some issues with styling on these dropdowns:

 

So how do I change the text color, slider color as well as font for these?

1 Answer, 1 is accepted

Sort by
0
Lance | Senior Manager Technical Support
Telerik team
answered on 04 Dec 2023, 06:17 PM

Hi Rene,

In your case, I strongly recommend that you set the app's theme to light, then all of these issues will be resolved. 

This is literally a 1-liner fix.

  1. Open MyProject/Platforms/Windows/App.xaml
  2. Add "RequestedTheme="Light" to the opening XAML tag

<maui:MauiWinUIApplication
    x:Class="MauiDemo.WinUI.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:maui="using:Microsoft.Maui"
    xmlns:local="using:MauiDemo.WinUI"
    RequestedTheme="Light">

</maui:MauiWinUIApplication>

Now, when the WinUI 3 app is running, it will respect your app's light theme and those light foreground colors will be dark again

 

Note: The other option is to have dozens and dozens of custom styles and templates to override everything. Yes, there are a couple common keys you can override on WinUI native, but that's honestly the wrong way to go about it if your app doesn't have a dark theme.

Regards,
Lance | Manager Technical Support
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com
René
Top achievements
Rank 1
Iron
commented on 05 Dec 2023, 06:17 AM

Thank you. But that doesn't solve the issue about setting the font. Also, our app has a specific color scheme that I would like to use for buttons etc.

So any help in properly theming the control would be very welcomed.

Didi
Telerik team
commented on 05 Dec 2023, 08:16 AM

The control does not provide theming mechanism. The options to style the toolbar are described here: https://docs.telerik.com/devtools/maui/controls/imageeditor/toolbar/styling

Could you please send me the setup you use, styling options, and what are the exact elements you want to style.

 
Tags
ImageEditor
Asked by
René
Top achievements
Rank 1
Iron
Answers by
Lance | Senior Manager Technical Support
Telerik team
Share this question
or