Q1 2014 Object reference not set .. RadRibbonSplitButton?

3 posts, 0 answers
  1. Rob Ainscough
    Rob Ainscough avatar
    172 posts
    Member since:
    Jan 2010

    Posted 09 Jun 2014 Link to this post

    After upgrading from Q1 2013 to Q1 2014 UI Controls I started getting the following error on all my RadRibbonSplitButton references in my XAML ... error: 

    "Object reference not set to an instance of an object"

    <telerik:RadRichTextBoxRibbonUI.QuickAccessToolBar>
        <telerik:QuickAccessToolBar>
            <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=SaveCommand}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/save.png" Text="Save" />
               <telerik:RadRibbonSplitButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=UndoCommand}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/undo.png" Text="Undo">
                <telerik:RadRibbonSplitButton.DropDownContent>
                    <telerik:MultipleUndoControl telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=MultipleUndoCommand}" />
                </telerik:RadRibbonSplitButton.DropDownContent>
               </telerik:RadRibbonSplitButton>
            <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=RedoCommand}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/redo.png" Text="Redo" />
        </telerik:QuickAccessToolBar>
    </telerik:RadRichTextBoxRibbonUI.QuickAccessToolBar>

    If I switch back to the Q1 2013 UI Controls, I don't get any error.

    Does anyone know what breaking changes were introduced into Q1 2014 that causes problems with RadRibbonSplitButton?

    Thanks, Rob.
  2. Petya
    Admin
    Petya avatar
    975 posts

    Posted 12 Jun 2014 Link to this post

    Hi Rob,

    I suggest we continue our conversation in the support ticket you started on the topic. 

    For anyone who might encounter a similar issue, the cause of the error was the fact that resource dictionaries were merged in the project, but the assemblies added to the project were not the NoXaml ones. More about implicit styles is available here.

    Regards,
    Petya
    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.
     
  3. DevCraft banner
  4. Rob Ainscough
    Rob Ainscough avatar
    172 posts
    Member since:
    Jan 2010

    Posted 12 Jun 2014 in reply to Petya Link to this post

    Changing to NoXAML DLLs was just part of the partial solution to this problem.  Setting the MergedDictionaries was another part ... specifically some (not all) of the controls MUST be referenced using Themes DLL reference rather than a project reference to the Themes *.xaml.

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/System.Windows.xaml"/>
        <ResourceDictionary Source="/MyApplication;component/Themes/Telerik.ReportViewer.Silverlight.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Chart.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Data.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.DataVisualization.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Diagrams.Extensions.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Diagrams.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Docking.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Expressions.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.FixedDocumentViewers.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.FixedDocumentViewersUI.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.GanttView.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.GridView.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.ImageEditor.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.MediaPlayer.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Pivot.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.PivotFieldList.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.RibbonView.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.RichTextBoxUI.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.ScheduleView.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Spreadsheet.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Documents.Proofing.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Documents.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    There appear to be differences with the Theme DLLs (the NoXAML ones) vs. the Theme XAML's Telerik provide.  Documentation says this is an alternate approach ... it is not.

    There are also differences in the Theme XAML files from Telerik Reporting Q1 2014 vs. UI Controls Q1 2014 which can cause more issues (specifically Telerik.ReportViewer.Silverlight.xaml).

    For the VS 2012 designer (design time) to work correctly then the Theme DLL MUST be referenced in the project or else I will get various sporadic designer errors when I come to edit my XAML pages.

    However, warning to all ... Q1 2014 has introduced deeper issues with the designer (at design time) in VS 2012 where it will cause the message "Waiting for background operation to complete..." and the operation never completes and VS 2012 will appear frozen - xDesProc gets stuck in some infinite loop and will consume all available RAM in the 32bit address space and eventually timeout with an "out of memory".

    There are no Event log entries so it's difficult to say what in Q1 2014 is causing this "Freezing" at design time ... I have JetBrains ReSharper 8.2 and also using TFS (Ultimate edition) but they were working perfectly with Q1 2013.

    Rob
Back to Top