Answered by:
Rehosted Designer Binding Issues

Question
-
Hello,
I'm working with the latest Windows Workflow Foundation and I'm rehosting the designer. I've browsed around and looked into samples however I keep getting some binding errors that I have no idea how to solve. This is what I get in output:
System.Windows.Data Error: 40 : BindingExpression path error: 'ToolboxItem' property not found on 'object' ''ToolboxItemWrapper' (HashCode=16945151)'. BindingExpression:Path=ToolboxItem.DisplayName; DataItem='ToolboxItemWrapper' (HashCode=16945151); target element is 'TreeViewItem' (Name=''); target property is 'Name' (type 'String')
System.Windows.Data Error: 1 : Cannot create default converter to perform 'one-way' conversions between types 'System.Collections.ObjectModel.Collection`1[System.Activities.Activity]' and 'System.Activities.Presentation.Model.ModelItemCollection'. Consider using Converter property of Binding. BindingExpression:Path=ModelItem.Activities; DataItem='SequenceDesigner' (Name=''); target element is 'WorkflowItemsPresenter' (Name=''); target property is 'Items' (type 'ModelItemCollection')
To my understanding the 2nd error tells that I need to provide a convertor for a binding however I am not making any bindings. I just create the WorkflowDesigner and load a new Sequence instance. I do this in the constructor:
public U4SWorkflowDesignerUserControl()
{
InitializeComponent();(new DesignerMetadata()).Register();
_workflowDesigner = new WorkflowDesigner();
_workflowDesigner.Load(new Sequence());_toolboxControl = new ToolboxControl();
ToolboxCategory toolboxCategory = new ToolboxCategory("Test");
toolboxCategory.Add(new ToolboxItemWrapper(typeof(Sequence)));
_toolboxControl.Categories.Add(toolboxCategory);Grid.SetColumn(_workflowDesigner.View, 2);
grid1.Children.Add(_toolboxControl);
grid1.Children.Add(_workflowDesigner.View);
}If I comment the line with (new DesignerMetadata()).Register(); I receive no binding errors however that makes the designer useless since I cannot edit anything.
Thanks in advance,
Andrei Fangli
Tuesday, February 11, 2014 2:38 PM
Answers
-
Hi,
they usually seem to be ignorable.For more information, you can refer here
#In Workflow Activity Icons in a rehosted Workflow Designer
Hope it can help you.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.
- Marked as answer by Pengzhen Song Friday, February 21, 2014 1:31 AM
Wednesday, February 12, 2014 6:29 AM
All replies
-
Hi,
they usually seem to be ignorable.For more information, you can refer here
#In Workflow Activity Icons in a rehosted Workflow Designer
Hope it can help you.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.
- Marked as answer by Pengzhen Song Friday, February 21, 2014 1:31 AM
Wednesday, February 12, 2014 6:29 AM -
Thanks for the links. Unfortunately I still can't get the errors to disappear, it seems to be something internal to WF as they show even when I'm not making any bindings.Monday, March 3, 2014 8:40 AM