How to chamge theme from combobox in the title bar

I have Chromeless window where I have placed Combobox with a list of specific themes I would like user to apply to window. Unfortunetly when I select a theme in combobox it does not do anything. I have placed the combobox below the title bar and it works. I want my application to have the combobox i the title bar for this application. What am I missing. I have attached my code.

Attachment: ComboBox_Binding_b1af2346.zip

1 Reply 1 reply marked as answer

VR Vijayalakshmi Roopkumar Syncfusion Team February 17, 2021 01:31 AM UTC

Hi Marius, 
 
Thank you for contacting Syncfusion Support. 
 
We have checked the reported requirement that the theme does not applied properly when ComboBox is in TitleBar . On further analyzing the reported behavior using your sample, we have observed that you are accessing the RightHeaderItemsSource property by referring the resource maintained in ResourceDictionary. While using this approach, the window does not able to access the control which is maintained in window resources and it turns lead to binding error, so only the theme does not applied properly when the ComboBox is in TitleBar. So we suggest you to set the RightHeaderItemsSource directly without using resource as shown in below code. 
 
Code:[XAML] 
 
 
<syncfusion:ChromelessWindow.RightHeaderItemsSource> 
<listCollection:ArrayList> 
<syncfusion:ComboBoxAdv x:Name="themeComboBox" SelectedIndex="0"> 
<syncfusion:ComboBoxAdv.ItemsSource> 
<listCollection:ArrayList> 
<system:String>MaterialLight</system:String> 
<system:String>MaterialDark</system:String> 
</listCollection:ArrayList> 
</syncfusion:ComboBoxAdv.ItemsSource> 
</syncfusion:ComboBoxAdv> 
</listCollection:ArrayList> 
</syncfusion:ChromelessWindow.RightHeaderItemsSource> 
 
 
 
Please find the sample for the same can be downloaded from following location 
 
 
So please try this suggestion and let us know if it meets your requirment. 
 
Regards, 
Vijayalakshmi VR 


Marked as answer
Loader.
Up arrow icon