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

merged dictionary

1 Answer 171 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
robert
Top achievements
Rank 1
robert asked on 26 Aug 2014, 07:08 AM
Hello Telerik Team,
i have a user control Project. I declared the theme files in MergedDictionaries to style the ganttcontrol.
The structure is designed as Mvvm. When i start the Application i get a Null reference exception.
How can i fix this issue? Thank you and regards Robert ...
 
<UserControl
    x:Class="GanttView.GanttControl"
    xmlns:vm="clr-namespace:GanttViewModel;assembly=GanttViewModel"
    DataContext="{DynamicResource GanttViewModel}"
    mc:Ignorable="d" d:DesignHeight="1024" d:DesignWidth="1280">
 
    <UserControl.Resources>
        <ResourceDictionary>
            <vm:GanttControlViewModel x:Key="GanttViewModel"/>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/GanttView;component/Themes/System.Windows.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/GanttView;component/Themes/Telerik.Windows.Controls.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/GanttView;component/Themes/Telerik.Windows.Controls.GanttView.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

1 Answer, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 26 Aug 2014, 11:35 AM
Hello Robert,

I don't see anything incorrect in the way you have merged the ResourceDictionaries, I have also tested it and it work as expected. Please make sure you have the correct paths to the XAML files as this might cause the issue. However the exception might be caused by something else, not the merged dictionaries, if so we would need more sample code or a sample project if possible.

I'm looking forward to hearing from you.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GanttView
Asked by
robert
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or