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);