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

WPF Application with Fluent Theme

5 Answers 234 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Archana
Top achievements
Rank 1
Archana asked on 29 Aug 2018, 07:43 AM
Is there a working sample WPF project that uses the Fluent Theme for our reference? We are having some difficulties integrating the theme into our application.

5 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 31 Aug 2018, 02:37 PM
Hello Archana,

There are several applications that shows a set up with Fluent theme. However, the applications are quite complex and has a theme changing mechanism implemented, so I am not sure how useful they will be for a basic set up. One of those is the demos application. You can check how to get its source in the Installing WPF Demos article.

What I could recommend you is to follow the steps in the Setting a Theme article and apply the approach shown there in a fresh project with the controls you want to use. 

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Archana
Top achievements
Rank 1
answered on 03 Sep 2018, 09:21 AM
Hi Martin.. Thanks for the reply. I managed to use WPF project with Fluent Theme. Now, when I create a Windows Form application and try to include the WPF project inside ElementHost, I get an error with the Navigation dll (Could not load file or assembly 'Telerik.Windows.Controls.Navigation... ). However, the standalone WPF projecti is running fine. Is there anything else I need to include in the main Windows form application?
0
Martin Ivanov
Telerik team
answered on 06 Sep 2018, 06:45 AM
Hello Archana,

To resolve this you will need to reference the Telerik dlls also in the WinForms project that references the WPF one. Please try this and let me know how it goes.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Archana
Top achievements
Rank 1
answered on 06 Sep 2018, 08:10 AM

Hello Martin,

Yes, I did try adding the reference to the WinForms project as well and now there is no error but the WinForms (elementhost of which references WPF project) doesn't display any content. The contents loads fine when Telerik WPF's controls are replaced by default WPF controls.

0
Martin Ivanov
Telerik team
answered on 06 Sep 2018, 10:13 AM
Hello Archana,

You can double check if the versions of the referenced Telerik assemblies in both project (WPF and WinForms) are the same. For example: 2018.2 620. Then if you use NoXaml dlls you can check where the theme resources are merged. The Setting a Theme article tells that the resources can be merged in the App.xaml Resources collection. However, in the WinForms hosting scenario you don't have App.xaml. In this case you will need to merge the resources manually in each view that is used in the WinForms application. For example in the MainWindow.xaml Resources collection.

After this you can manually clean an rebuild both the projects and see if the issue resolves.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Archana
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Archana
Top achievements
Rank 1
Share this question
or