The constructor of this control throws a NullReferenceException with the following StackTrace:
at Syncfusion.UI.Xaml.Diagram.ConnectorWrapper.SourcePortIDChanged()
at Syncfusion.UI.Xaml.Diagram.ConnectorWrapper.OnGraphChanged()
at Syncfusion.UI.Xaml.Diagram.GroupableWrapper.Init(Object source)
at Syncfusion.UI.Xaml.Diagram.SfDiagramWrapper.GetConnectorWrapper(Object source, Boolean canCreate)
at Syncfusion.UI.Xaml.Diagram.ObservableElements`2..ctor(Object source, ElementType type, SourceType srcType, EventAggregartor aggregator, Func`3 wrapper)
at Syncfusion.UI.Xaml.Diagram.SfDiagramWrapper.OnConnectorsChanged()
at Syncfusion.UI.Xaml.Diagram.SfDiagramWrapper.OnPropertyChanged(String propertyName)
at Syncfusion.UI.Xaml.Diagram.WrapperBase.KnownSource_PropertyChanged(Object sender, PropertyChangedEventArgs e)
at Syncfusion.UI.Xaml.Diagram.SfDiagram.OnPropertyChanged(String name)
at Syncfusion.UI.Xaml.Diagram.SfDiagram.OnConnectorsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.Baml2006.WpfMemberInvoker.SetValue(Object instance, Object value)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
at MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.SetValue(Object obj, XamlMember property, Object value)
at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent)
at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx)
at System.Xaml.XamlObjectWriter.WriteEndObject()
at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
at System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at OPMG.SystemControls.Oneline.InitializeComponent() in D:\svn\OPMG Client\OPMG\SystemControls\Oneline.xaml:line 1
at OPMG.SystemControls.Oneline..ctor(IOnelineVM vm, IAssetService assetService) in D:\path\<MyControl>.xaml.cs:line 47
at lambda_method(Closure , IBuilderContext )
at Microsoft.Practices.ObjectBuilder2.DynamicBuildPlanGenerationContext.<>c__DisplayClass1.<GetBuildMethod>b__0(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
If I comment out the connector that uses the node ports the code runs fine (granted without the connector that I want), so it is obviously the source of the issue. If I live edit the XAML and add the connector while the control is running it creates and renders the connector just fine, but then when I restart my app and reload the control I get the same error.
I should note that this issue is not limited to Port-Port connection, anytime I try to define connectors to NodePorts in XAML I encounter this issue. I had to implement an algorithm that iterates through nodes with Ports at start up and manually create the connectors in code behind myself. So this seems to be an issue with the order in which things are initialized by your control. This is just the first case where my custom logic is getting out of hand to provide functionality that your library should already offer.
This is currently blocking development on a time sensitive project, so a prompt response is much appreciated.