Diagram sample

1 Answer 45 Views
Diagram
Pete
Top achievements
Rank 1
Iron
Iron
Iron
Pete asked on 28 Jul 2021, 10:07 AM

Hi

I'm trying to put together a diagram sample. I based it on this: https://www.telerik.com/forums/issue-in-copy-and-paste-diagram-items as the report was about a stack trace similar to the one I'm experiencing and trying to track down: 

System.ArgumentNullException
  HResult=0x80004003
  Message=Value cannot be null.
Parameter name: dataObject
  Source=Telerik.Windows.Controls.Diagrams
  StackTrace:
	at Telerik.Windows.Controls.Diagrams.DataTransferService.HandleDiagramElementDrop(DataObject dataObject)

It builds fine but when I run it, I get an empty window, even if I click on the launch button. I can see no errors at runtime. I've attached a ZIP file of the project.

1 Answer, 1 is accepted

Sort by
1
Accepted
Stenly
Telerik team
answered on 30 Jul 2021, 12:36 PM

Hello Pete,

The empty window is usually caused when referencing the NoXaml assemblies. NoXaml means that the there is no Xaml code in the dlls. And If the theme is not set in the App.xaml, the window will appear empty, as in your case. There are two ways to tackle the issue you have:

  1. Reference the Xaml dlls instead of NoXamls'(which are found in Binaries folder and not in Binaries.NoXaml)
  2. Set a theme using implicit styles

The following documentations explain in depth the differences between Xaml and NoXaml, and how to use them correctly:

Setting a Theme | Telerik UI for WPF

Xaml vs. NoXaml | Telerik UI for WPF

Also, you can check the Missing Controls in the UI article.

Regarding the sample project you have provided, I tested it and after changing the dlls, it worked wonderfully. I am attaching it for your convenience.

Regards,
Stenly
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Diagram
Asked by
Pete
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Stenly
Telerik team
Share this question
or