Issues with Designer and implicit styles

2 posts, 0 answers
  1. Sean
    Sean avatar
    4 posts
    Member since:
    Jun 2018

    Posted 14 Feb Link to this post

    I am trying to get the telerik WPF controls to load during design time with the no binaries setup. I have managed to get the main window to show up once by linking directly to the theme dll, but that did not work for any of the modules. I am trying to get the structure of the application nailed down before we get deep into development, and having the theme/ui consistent is important.

     

    The theme files are placed in core project and are referenced by the main application.

    <ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:core="clr-namespace:Insight.Core">
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/Insight.Core;component/Themes/FluentLight/System.Windows.xaml"/>
            <ResourceDictionary Source="/Insight.Core;component/Themes/FluentLight/Telerik.Windows.Controls.Data.xaml"/>
            <ResourceDictionary Source="/Insight.Core;component/Themes/FluentLight/Telerik.Windows.Controls.Docking.xaml"/>
            <ResourceDictionary Source="/Insight.Core;component/Themes/FluentLight/Telerik.Windows.Controls.GridView.xaml"/>
            <ResourceDictionary Source="/Insight.Core;component/Themes/FluentLight/Telerik.Windows.Controls.Input.xaml"/>
            <ResourceDictionary Source="/Insight.Core;component/Themes/FluentLight/Telerik.Windows.Controls.Navigation.xaml"/>
            <ResourceDictionary Source="/Insight.Core;component/Themes/FluentLight/Telerik.Windows.Controls.VirtualGrid.xaml"/>
            <ResourceDictionary Source="/Insight.Core;component/Themes/FluentLight/Telerik.Windows.Controls.xaml"/>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>

    The main app

    <prism:PrismApplication x:Class="Insight.Shell.App" 
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                            xmlns:prism="http://prismlibrary.com/" 
                            xmlns:views="clr-namespace:Insight.Shell.Views"
                            xmlns:srch="clr-namespace:Insight.Shell.Modules.ItemSearch.Navigation;assembly=Insight.Shell.Modules.ItemSearch"
                            xmlns:bom="clr-namespace:Insight.Shell.Modules.Bom.Navigation;assembly=Insight.Shell.Modules.Bom">
        <Application.Resources>
            <ResourceDictionary>
                <ResourceDictionary.MergedDictionaries>
                    <ResourceDictionary Source="pack://application:,,,/Insight.Core;component/Themes/Generic.xaml"/>

     

                    This set of instructions was for the linked theme binary

                   <!--<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Data.xaml" />-->
                    <ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.xaml" />
                    <ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />-->

                </ResourceDictionary.MergedDictionaries>

                <Style TargetType="views:MainWindow" BasedOn="{StaticResource RadWindowStyle}" />
                <Style TargetType="srch:ItemSearchNavigationCommand" BasedOn="{StaticResource RadNavigationViewItemStyle}" />
                <Style TargetType="bom:BomNavigationCommand" BasedOn="{StaticResource RadNavigationViewItemStyle}" />
            </ResourceDictionary>
        </Application.Resources>
    </prism:PrismApplication>

     

    The application works correctly, and the theme is applied at run time, but during the design phase, the UI is not present at all and it makes the layout with the designer difficult if not impossible since you cant see any of the controls on the page.

     

    Thanks for your help.

    -Sean

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1139 posts

    Posted 19 Feb Link to this post

    Hello Sean,

    Would you find it possible to test this out with our latest release as there was an issue with the RadGlyph control which I believe can be related to the controls not being displayed in the designer?

    I set up a small sample project which works as expected when built with the latest binaries. Can you please also test it at your end and let me know if you can observe the controls in the designer with it?

    I will be awaiting your reply.

    Regards,
    Dilyan Traykov
    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