WPF Application with Fluent Theme

6 posts, 0 answers
  1. Archana
    Archana avatar
    7 posts
    Member since:
    Nov 2015

    Posted 29 Aug 2018 Link to this post

    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.
  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2425 posts

    Posted 31 Aug 2018 Link to this post

    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.
  3. Archana
    Archana avatar
    7 posts
    Member since:
    Nov 2015

    Posted 03 Sep 2018 in reply to Martin Ivanov Link to this post

    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?
  4. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2425 posts

    Posted 06 Sep 2018 Link to this post

    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.
  5. Archana
    Archana avatar
    7 posts
    Member since:
    Nov 2015

    Posted 06 Sep 2018 in reply to Martin Ivanov Link to this post

    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.

  6. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2425 posts

    Posted 06 Sep 2018 Link to this post

    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.
Back to Top