'Dynamic' RadMenu not working with dynamic themes

1 Answer 21 Views
Menu
Dirk
Top achievements
Rank 1
Iron
Dirk asked on 22 Aug 2022, 07:57 AM

I've tried to combine the Telerik examples 'Dynamic RadMenu' with 'Switching themes at runtime'.
I've realized, that the subitems of the RadMenu do not change the theme (color) correctly.

I think that the ItemContainerStyle don't work correctly.

I've attached an example with two RadMenu.
First is created dynamically the second is static.

In the menu you can switch to different themes.
Please have look to the submenues (file). The color don't change.

I've also realized that also the size of the icons are displayed differently.

1 Answer, 1 is accepted

Sort by
0
Accepted
Stenly
Telerik team
answered on 22 Aug 2022, 10:40 AM

Hello Dirk,

Let me begin by saying that switching themes at runtime is only supported with the NoXaml version of the assemblies. When adding our products via NuGet packages, the ones that contain this version, do not have ".Xaml" at the end of their name. For example, the package that contains the NoXaml version of all of our assemblies, for the .NET 6 framework version is "Telerik.UI.for.Wpf.60".

Regarding the wrongly styled dynamic RadMenu control, when creating custom styles, they would have to be merged once the theme is changed. The custom RadMenuItem style could be defined in a ResourceDictionary and once the theme is changed, merge this ResourceDictionary. In addition, the Switching Custom Styles with Themes at Runtime article could prove useful in this regard.

I have modified the sample project, so, could you give it a try?

Regards,
Stenly
Progress Telerik

The Premier Dev Conference is back! 

Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.


Dirk
Top achievements
Rank 1
Iron
commented on 22 Aug 2022, 03:59 PM

Thanks Stenly,

your solution is working in this demo.
But I have a probem using the 'no xaml' version in my solution.

I've created an other posting.
I'm not able to use PRISM 8 within Telerik with the 'no xaml' version:
https://www.telerik.com/forums/telerik-wpf-no-xaml-and-prism-8#1577019

Regards
Dirk

PS: I'm evaluating if the Telerik controls are fitting our requirements:
- PRISM 8
- Dynamic themes
- Dynamic language switch (OK)
- Docking (Prism Regions) (OK)

 

Stenly
Telerik team
commented on 24 Aug 2022, 03:08 PM

Hello Dirk,

Since a solution has been found for the matter in the above-shared forum thread, may I presume that all of the inquiries regarding the RadDocking control have been resolved? If this is the case, I will mark my initial reply as an answer. However, if there are any further questions about this forum thread's topic, please shared them.

Dirk
Top achievements
Rank 1
Iron
commented on 24 Aug 2022, 04:47 PM

Hi Stanley,

my questions regarding RadMenu and RadWindow are resolved within this posting.

I've still found a problem regarding RadDocking without Xaml embedded controls.

I have prepared screenshots and examples in an other posting. Would be great if you have time to have a look.

I would also help to update all your examples to Prism 8

Regards Dirk

Stenly
Telerik team
commented on 29 Aug 2022, 12:49 PM

Hello Dirk,

I have provided an answer in this forum thread, regarding the RadDocking control. Could you give the proposed suggestions a try and let me know how it goes?

Tags
Menu
Asked by
Dirk
Top achievements
Rank 1
Iron
Answers by
Stenly
Telerik team
Share this question
or