xaml designer issues in Visual Studio 2012 (and Blend Preview)

2 posts, 0 answers
  1. James
    James avatar
    4 posts
    Member since:
    Aug 2012

    Posted 09 Nov 2012 Link to this post

    We are attempting to use a RadDiagram that is nested inside two usercontrols. Our solution follows something like this:
    - controls project
      -usercontrol
        -diagram
    -app project
      -usercontrol
        -usercontrol (from controls project)

    In the usercontrol the diagram is hosted in, the xaml designer can display the usercontrol and diagram without any errors. When viewing the parent usercontrol (in the app project) in the xaml designer, we intermittently receive one of three errors:

    1.
    Error 51 [A]Telerik.Windows.Controls.RadListBox cannot be cast to [B]Telerik.Windows.Controls.RadListBox. Type A originates from 'Telerik.Windows.Controls, Version=2012.3.1017.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'LoadNeither' at location 'users\...\AppData\Local\Microsoft\VisualStudio\11.0\Designer\ShadowCache\uaf4o2b1.tgx\m5d3emjg.5ms\Telerik.Windows.Controls.dll'. Type B originates from 'Telerik.Windows.Controls, Version=2012.3.1017.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'LoadFrom' at location 'C:\Program Files (x86)\Telerik\RadControls for WPF Q3 2012\Binaries\WPF45\Telerik.Windows.Controls.dll'.

    2.
    Telerik.Windows.DragDrop.Behaviors.DragDropState', on 'Telerik.Windows.DragDrop.Behaviors.DragDropBehavior`1[TState]' violates the constraint of type parameter 'TState'

    3.
    Cannot find resource file 'themes/genericwindows8touch.xaml'


    The project builds and runs fine, but this issue causes problems for our designers who use the xaml designer and Blend (which reports the same errors in the designer). The first situation seems odd as we do not reference telerik controls from the install directory (C:\Program Files (x86)\Telerik\RadControls...) anywhere.

    Are there any known issues with the diagram control, or possibly the listbox control and the 2012 xaml designer?

    Thanks,
    James
  2. George
    Admin
    George avatar
    1332 posts

    Posted 14 Nov 2012 Link to this post

    Hello James, 

    Straight to your questions:
    1. This error usually appears when two or more projects have references to assemblies with same name, but different locations. Another reason could be that not all projects in the solution are rebuild. I would suggest referring the assemblies from only one place. Cleaning and rebuilding 
      each project should do the trick as well.
    2. Could you please give us some more information about this error? What xaml causes this message? Can you reproduce it in a sample project or only in the current application?
    3. I guess this is the resource file which is merged in the app.xaml? I would suggest using the following URI syntax: "/ReferencedAssembly;component/Subfolder/ResourceFile.xaml" and in the given scenario it goes like this: "/ReferencedAssembly;component/themes/genericwindows8touch.xaml"

    Hope this helps.

    Regards,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top