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

Issues with Designer and implicit styles

1 Answer 161 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 15 Feb 2020, 04:09 AM

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

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 19 Feb 2020, 03:52 PM

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.
Tags
General Discussions
Asked by
Sean
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or