I am new to WPF and utilizing the XamDiagram with mostly VB code-behind operations to configure it as well as manipulating nodes. Is it possible to embed user controls in a DiagramNode using code-behind?
Thanks for any help you can offer!
Matt
Hello Mathew,
A UserControl can be used as node for the XamDiagram by setting it as a DisplayTemplate for the node. Gergana has shared a sample project on the same at http://es.infragistics.com/community/forums/t/93312.aspx. Please refer to her last update where a code behind solution was provided.
Let me know if you have any other questions.
Thank you for the reply!
I had previously looked at the referenced example, but I was having a hard time grasping how to utilize a user control that is part of my project rather than a template directly in XAML. I would like to have nodes consist of more complex controls for editing/displaying data that can accessed from code-behind.
I am utilizing this control in a VB WinForms project and my experience with XAMl and WPF is limited, thus my tendency to utilize VB code-behind.
Thanks,
Thank you for the feedback Matt!Please feel free to contact us if you have any questions related to Infragistics products.
Thank you very much Maria, this is very helpful!
I viewed the example provided and it is exactly what I needed to get me going in the right direction.
Thank you!
Hello Matt,You can create the UserControl as a separate class and then just add it as content to the DataTemplate. I have modified the sample from the other forum thread and add a method CreateUserControlDataTemplate() to create a DataTemplate with the custom UserControl1 class.Let me know if you need further assistance.