"Problem Loading" in XAML

7 posts, 0 answers
  1. Liordino
    Liordino avatar
    9 posts
    Member since:
    Aug 2012

    Posted 21 Sep 2012 Link to this post

    Hi!

    Recently I was using the trial version of Telerik Silverlight controls, and after a monteh the company bought the full version, but after updating the projects I'm now getting the following error when I open the XAML files on my Visual Studio 2010 designer:

    Problem Loading

    The document contains error that must be fixed vefore the designer can be
    loaded. Reload the designer after you have fixed the errors.


    I try to reload the designer, but it give me this stack trace:

    ArgumentNullException was thrown due to document error: Value cannot be null.
    Parameter name: key Click here to hide detail.

    An Unhandled Exception has ocurred

    Value cannot be null.
    Parameter name: key
       at System.Collections.Generic.SortedList`2.IndexOfKey(TKey key)
       at Microsoft.Expression.DesignModel.DocumentModel.DocumentCompositeNode.PropertyDictionary.Contains(IProperty propertyKey)
       at Microsoft.Expression.DesignModel.Core.UserControlInstanceBuilderHelper.ShouldInstantiatePreviewControl(IInstanceBuilderContext context, ViewNode viewNode, XamlDocument& sourceDocument, String& sourcePath)
       at Microsoft.Expression.Platform.Silverlight.InstanceBuilders.UserControlInstanceBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
       at MS.Internal.Services.DesignModeValueProviderService.DesignModeValueProviderBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
       at Microsoft.Expression.DesignModel.Core.ViewNodeManager.Instantiate(ViewNode viewNode)


    Funny thing is that the project still compiles and run without a problem, but since I need to do some changes o the designer, it's kinda of a problem for me.

    Anyone know how can I fix it?

    Thanks in advance!
  2. Chris
    Chris avatar
    4 posts
    Member since:
    Jan 2012

    Posted 01 Oct 2012 Link to this post

    Till a few hours ago, everything was working perfect in my silverlight-application, but now, after upgrading to the latest release of the controls, I do have the same problem.

    I can not realy point to a responsible control because all my XML's are affected. Did anybody from support allready pick this up?

    Best regards
  3. DevCraft banner
  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 01 Oct 2012 Link to this post

    Hello,

     May I ask you to test with the Latest Internal Build which will be available for download later today?

    All the best,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. Chris
    Chris avatar
    4 posts
    Member since:
    Jan 2012

    Posted 01 Oct 2012 Link to this post

    Hello Didie

    Thanx for the swift reply but, could you be a little bit more specific? I have for the moment build v2012.2.912.1050 installed. When I try to update, the upgrade wizard tells me that my system is up to date and no download is required.

    Oh yes, and maybe another question. How crazy (and possible) is it, in a case like this, to do a downgrade of the build? With other words, if I do select a previous version in the upgrade wizard, will my project be downgraded without any problems?

    Best regards

    Chris
  6. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 02 Oct 2012 Link to this post

    Hi Chris,

    The last Latest Internal Build is with version 2012.2.1001. You can check this help article for a detailed instructions on how to install a hotfix. In order to have an access to the LIB through the Upgrade Wizard, you should enable that option in the Options Window as explained in this help article

    As to your last question, you could use the Wizard to upgrade or downgrade the version.

    Regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  7. Chris
    Chris avatar
    4 posts
    Member since:
    Jan 2012

    Posted 03 Oct 2012 Link to this post

    Hey Diddie

    I'm still suffering the same problem. The code compiles & runs whitout any problem. Also viewing the XAML ain't a problem but the moment I dare to click the Design-screen of a XAML-file, I receive an empty screen , with errormessage on the top. Going back to the XAML gives complete foaulted code. I'll attach some screenshots and the code of one of my XAML-files.

    Best regards

    Chris

    <navigation:Page x:Class="IQSuite.DetailScreens.CompanyDetail"
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    mc:Ignorable="d"
                    d:DesignHeight="394" d:DesignWidth="515" Unloaded="Page_Unloaded">
         
        <Grid x:Name="Maingrid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="200" />
                <ColumnDefinition Width="auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="25" />
                <RowDefinition Height="25" />
                <RowDefinition Height="25" />
                <RowDefinition Height="25" />
                <RowDefinition Height="25" />
                <RowDefinition Height="25" />
                <RowDefinition Height="25" />
                <RowDefinition Height="25" />
                <RowDefinition Height="25" />
                <RowDefinition Height="25" />
                <RowDefinition Height="25" />
                <RowDefinition Height="25" />
                <RowDefinition Height="25" />
                <RowDefinition Height="25" />
                <RowDefinition Height="*" />
                <RowDefinition Height="30" />
            </Grid.RowDefinitions>
     
     
            <TextBlock Grid.Row="1" Grid.Column="0" Margin="10 3 20 0" HorizontalAlignment="Right" Text="Ondernemingsnummer:" TextAlignment="Right" />
            <TextBlock Grid.Row="2" Grid.Column="0" Margin="10 3 20 0" HorizontalAlignment="Right" Text="RSZ-nummer:" TextAlignment="Right" />
            <TextBlock Grid.Row="3" Grid.Column="0" Margin="10 3 20 0" HorizontalAlignment="Right" Text="Naam:" TextAlignment="Right" />
            <TextBlock Grid.Row="4" Grid.Column="0" Margin="10 3 20 0" HorizontalAlignment="Right" Text="Omschrijving (kort):" TextAlignment="Right" />
            <TextBlock Grid.Row="5" Grid.Column="0" Margin="10 3 20 0" HorizontalAlignment="Right" Text="Omschrijving (lang):" TextAlignment="Right" />
            <TextBlock Grid.Row="6" Grid.Column="0" Margin="10 3 20 0" HorizontalAlignment="Right" Text="Adres:" TextAlignment="Right" />
            <TextBlock Grid.Row="7" Grid.Column="0" Margin="10 3 20 0" HorizontalAlignment="Right" Text="Gemeente:" TextAlignment="Right" />
            <TextBlock Grid.Row="8" Grid.Column="0" Margin="10 3 20 0" HorizontalAlignment="Right" Text="Postcode:" TextAlignment="Right" />
            <TextBlock Grid.Row="9" Grid.Column="0" Margin="10 3 20 0" HorizontalAlignment="Right" Text="Land:" TextAlignment="Right" />
            <TextBlock Grid.Row="10" Grid.Column="0" Margin="10 3 20 0" HorizontalAlignment="Right" Text="Telefoon:" TextAlignment="Right" />
            <TextBlock Grid.Row="11" Grid.Column="0" Margin="10 3 20 0" HorizontalAlignment="Right" Text="Fax:" TextAlignment="Right" />
            <TextBlock Grid.Row="12" Grid.Column="0" Margin="10 3 20 0" HorizontalAlignment="Right" Text="Email:" TextAlignment="Right" />
            <TextBlock Grid.Row="13" Grid.Column="0" Margin="10 3 20 0" HorizontalAlignment="Right" Text="Website:" TextAlignment="Right" />
     
            <telerik:RadMaskedTextBox Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" Name="txtOndernemingsnummer" VerticalAlignment="Top" Width="150" MaskType="None" Value="{Binding CompanyNumber}" />
            <telerik:RadMaskedTextBox Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" Name="txtRSZNummer" VerticalAlignment="Top" Width="150" MaskType="None"  Value="{Binding SocialSecurityNumber}"/>
            <telerik:RadMaskedTextBox Grid.Column="1" Grid.Row="3" HorizontalAlignment="Left" Name="txtName" VerticalAlignment="Top" Width="150" MaskType="None" Value="{Binding Name}" IsReadOnly="True"/>
            <telerik:RadMaskedTextBox Grid.Column="1" Grid.Row="4" HorizontalAlignment="Left" Name="txtDescription" VerticalAlignment="Top" Width="150" MaskType="None"  Value="{Binding ShortDescription}"/>
            <telerik:RadMaskedTextBox Grid.Column="1" Grid.Row="5" HorizontalAlignment="Left" Name="txtDescriptionLong" VerticalAlignment="Top" Width="250" MaskType="None"  Value="{Binding LongDescription}"/>
            <telerik:RadMaskedTextBox Grid.Column="1" Grid.Row="6" HorizontalAlignment="Left" Name="txtAdress" VerticalAlignment="Top" Width="250" MaskType="None"   Value="{Binding Adress}"/>
            <telerik:RadMaskedTextBox Grid.Column="1" Grid.Row="7" HorizontalAlignment="Left" Name="txtCity" VerticalAlignment="Top" Width="150" MaskType="None"   Value="{Binding City}"/>
            <telerik:RadMaskedTextBox Grid.Column="1" Grid.Row="8" HorizontalAlignment="Left" Name="txtZipcode" VerticalAlignment="Top" Width="150" MaskType="None"   Value="{Binding PostCode}"/>
            <telerik:RadComboBox Grid.Column="1" Grid.Row="9" HorizontalAlignment="Left" Name="cmbCountry" VerticalAlignment="Top" Width="150" SelectedValue="{Binding Country}" DisplayMemberPath="DescriptionShort" SelectedValuePath="Code" />
            <telerik:RadMaskedTextBox Grid.Column="1" Grid.Row="10" HorizontalAlignment="Left" Name="txtPhone" VerticalAlignment="Top" Width="150" MaskType="None"   Value="{Binding Phone}"/>
            <telerik:RadMaskedTextBox Grid.Column="1" Grid.Row="11" HorizontalAlignment="Left" Name="txtFax" VerticalAlignment="Top" Width="150" MaskType="None"   Value="{Binding Fax}"/>
            <telerik:RadMaskedTextBox Grid.Column="1" Grid.Row="12" HorizontalAlignment="Left" Name="txtEmail" VerticalAlignment="Top" Width="250" MaskType="None"   Value="{Binding Email}"/>
            <telerik:RadMaskedTextBox Grid.Column="1" Grid.Row="13" HorizontalAlignment="Left" Name="txtWebsite" VerticalAlignment="Top" Width="250" MaskType="None"   Value="{Binding WebSite}"/>
     
     
            <Border Height="1" VerticalAlignment="Top" Background="#FF4B4B4B" Grid.Row="15" Grid.ColumnSpan="3">
                <Border.OpacityMask>
                    <LinearGradientBrush StartPoint="0,1" EndPoint="0.9,0">
                        <GradientStop Offset="1" />
                        <GradientStop Offset="0.3" Color="White" />
                    </LinearGradientBrush>
                </Border.OpacityMask>
            </Border>
     
            <Grid Grid.Row="15" Grid.ColumnSpan="3">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:Label x:Name="lblModifiedBy" Content="Aangepast door:" Grid.Column="0"/>
                <telerik:Label x:Name="ModifiedBy" Content="{Binding ChangedBy}" Grid.Column="1"/>
                <telerik:Label x:Name="lblModifiedOn" Content="Aangepast op:" Grid.Column="3" HorizontalAlignment="Right"/>
                <telerik:Label x:Name="ModifiedOn" Content="{Binding ChangedOn}" Grid.Column="4" HorizontalAlignment="Right"/>
            </Grid>
        </Grid>
    </navigation:Page>
  8. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 03 Oct 2012 Link to this post

    Hello,

    I have tested your code snippet in a UserControl in a test project referencing the latest binaries for Silverlight 5 and the Designer was shown fine at my end.

    May I ask you to isolate the problem in a demo project and send it to us?
     

    Regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner