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

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

1 Answer 218 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 09 Nov 2012, 07:25 PM
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

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 14 Nov 2012, 05:29 PM
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.

Tags
Diagram
Asked by
James
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or