This is a migrated thread and some comments may be shown as answers.

ComboBox not taking Office2016Touch theme - what am I doing wrong?

2 Answers 194 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 10 Apr 2017, 01:59 PM

I'm trying to theme my app using implicit styles and the Office2016Touch theme.

Most controls look correct, but for some reason, the RadComboBox is only "half" themed - the dropdown looks correct, the mouseover effect looks correct, but the basic look still appears to be default/glass-like.

I've no idea what I'm doing wrong, even the most basic sample app seems to exhibit the problem.

Any help gratefully received!

2 Answers, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 12 Apr 2017, 07:17 AM
Hello David,

I have observed this scenario before and I could guess that you might be using assemblies with mixed types - XAML-included and noXAML assemblies. In order to get the theming right, you need to make sure that all your assemblies are noXAML (including the Telerik.Windows.Controls.dll, Telerik.Windows.Controls.Input.dll  etc.) since the Office2016Touch theme is supported with noXAML assemblies and implicit styles.

Regards,
Martin
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Christian
Top achievements
Rank 1
commented on 25 Jan 2022, 10:41 PM

I have the same issue. I followed the instructions, but it doesnt affect radcombobox. Everything is fine when the box is editable. When I set it to IsEditable="False", it changes the style back to default. I'm using Fluent Theme with implicite Styles.

Any guesses?

Stenly
Telerik team
commented on 26 Jan 2022, 12:20 PM

I have created a sample project that uses the NoXaml version of the assemblies and the set theme is Fluent. However, the RadCombobox control does not revert to its default theme when its IsEditable property is set to False.

My guess is that, as mentioned by my colleague Martin, there could be mixed types of assemblies - Xaml and NoXaml. This might be the reason behind the control's theme changing, as it is not supported to use both of these versions at once (it could lead to visual or design-time issues). You could refer to our Xaml vs NoXaml article from our documentation, for more detailed information on this matter.

With that said, I have attached the sample project, so, could you give it a try? If you need any further assistance, would you mind modifying this project, so that this behavior is also present in it?

Christian
Top achievements
Rank 1
commented on 26 Jan 2022, 02:21 PM

Same issue in your sample project.

Editable Combobox is in Fluent Style, non editable is default

Dilyan Traykov
Telerik team
commented on 27 Jan 2022, 01:05 PM

I tested the project Stenly provided and observe the following result after adding a second non-editable RadComboBox:



I can only assume that the references are not resolved correctly on your machine if their HintPath is not found. What I can suggest is to manually replace the references before running the project and deleting the bin and obj folders. You can also replace the references automatically by using the ReferencesResolver extension.

To ensure no caching is taking place, you may also restart Visual Studio.

Please test this updated project and let me know if you still experience the same issue.
Christian
Top achievements
Rank 1
commented on 29 Jan 2022, 06:42 PM

It just wont work :D I tested it on different machines. Same result. I'm sorry

Dilyan Traykov
Telerik team
commented on 01 Feb 2022, 02:16 PM

That is unfortunate. I also tested this on a separate machine but the control is still displayed as expected after changing the references.

Can you please try to manually modify the .csproj file to ensure the correct assemblies are referenced? You can do so by manually replacing the HintPaths with the full path to your Binaries.NoXaml folder:

    <Reference Include="Telerik.Windows.Controls">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>C:\Program Files (x86)\Progress\Telerik UI for WPF R1 2022\Binaries.NoXaml\WPF45\Telerik.Windows.Controls.dll</HintPath>
    </Reference>
    <Reference Include="Telerik.Windows.Controls.Input">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>.C:\Program Files (x86)\Progress\Telerik UI for WPF R1 2022\Binaries.NoXaml\WPF45\Telerik.Windows.Controls.Input.dll</HintPath>
    </Reference>
    <Reference Include="Telerik.Windows.Themes.Fluent">
      <HintPath>C:\Program Files (x86)\Progress\Telerik UI for WPF R1 2022\Binaries.NoXaml\WPF45\Telerik.Windows.Themes.Fluent.dll</HintPath>
    </Reference>

Please note that I've also removed the versions and other information from the Include attribute. Do let me know how this goes.

0
David
Top achievements
Rank 1
answered on 13 Apr 2017, 06:31 PM
Thank you. That was exactly what had happened.
Tags
ComboBox
Asked by
David
Top achievements
Rank 1
Answers by
Martin
Telerik team
David
Top achievements
Rank 1
Share this question
or