We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

WinRT Diagram Control Problems: Symbol Palette and others

Below, a code snippet for the diagram control (WinRT, 10.3.0.64).

This is taken pretty much from the WPF documentation, but it seems it should work on WinRT as well. Unfortunately, the line that enables the symbol palette causes a crash, but the exception is not helpful - apparently something goes wrong in a COM call under the hood.

I get the same exception if I just drag the control onto the design surface. When I drag the diagram control itself in Blend, I get a different error (ResourceMap Not Found). How do I make the controls work in WinRT? What am I doing wrong?

 

Thanks a lot!

    CS

 

 

System.Runtime.InteropServices.COMException was unhandled by user code
  HResult=-2147467259
  Message=Error HRESULT E_FAIL has been returned from a call to a COM component.
  Source=Windows.UI.Xaml
  ErrorCode=-2147467259
  StackTrace:
       at Windows.UI.Xaml.ResourceDictionary.put_Source(Uri value)
       at Syncfusion.UI.Xaml.Diagram.SymbolPalette..ctor()
       at Syncfusion.UI.Xaml.Diagram.DiagramControl.ConstructPalette()
       at Syncfusion.UI.Xaml.Diagram.DiagramControl.OnShowPalleteChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at Windows.UI.Xaml.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at Syncfusion.UI.Xaml.Diagram.DiagramControl.set_IsSymbolPaletteEnabled(Boolean value)
       at X_SFusion_Test.MainPage..ctor() in d:\Projects8303\X-SFusion-Test\X-SFusion-Test\MainPage.xaml.cs:line 31
       at X_SFusion_Test.X_SFusion_Test_XamlTypeInfo.XamlTypeInfoProvider.Activate_0_MainPage() in d:\Projects8303\X-SFusion-Test\X-SFusion-Test\obj\Debug\XamlTypeInfo.g.cs:line 123
       at X_SFusion_Test.X_SFusion_Test_XamlTypeInfo.XamlUserType.ActivateInstance() in d:\Projects8303\X-SFusion-Test\X-SFusion-Test\obj\Debug\XamlTypeInfo.g.cs:line 336
  InnerException:

 

 

dc = new DiagramControl();

dc.IsSymbolPaletteEnabled = true;

DiagramModel model = new DiagramModel();

dc.Model = model;

DiagramView view = new DiagramView();

view.Bounds = new Thickness(0, 0, 1000, 1000);

dc.View = view;

diagramgrid.Children.Add(dc);


1 Reply

RT Ramya Thirugnanam Syncfusion Team December 3, 2012 03:52 AM UTC

Hi Christian,

Please find the responses to your queries as below.


S.No

Query

Response

1.

Symbol palette causes a crash and

same exception if I just drag the control onto the design surface

We have used the given code for creating the Diagram Control, it works fine for us. Based on the provided stack trace, we suspect that the reported issues “Symbol Palette Crash and exception while drag and drop the Diagram Control” are due to “dll reference”. We recommend to use Package reference instead of “dll reference” in WINRT.

 

We have attached the document to represent the steps to add the Package reference to the Project as below. Please refer to the attached document.

 

2.

Drag the diagram control itself in Blend, I get a different error (Resource Map Not Found).

The reported Resource Map Not Found exception due to “dll reference”.as explained above, please use Package reference. But Blend does not have an option to add the Package reference to Project.

 

Solution:

Use the Project in Blend after adding the Package reference using VS2012.

 

 

Please let us know if you have any concerns,

Regards,

Ramya

 



Steps_c5a9ed6c.zip

Loader.
Live Chat Icon For mobile
Up arrow icon