I am trying to create multiple user controls for some projects I am working on. Many of them have the multi-column combo in them along with other controls.
A few of these user controls contain other user controls that have the combo in it, however, I do not seem to be able to pass the binding from the form through the two user control levels to the combo.
Any suggestions on what may be causing the issue? (FYI, I am coding in VB.net)
Hello Seradex,
Thank you for your post. I have been looking into your question and I have managed to achieve the described scenario. I have create a user control with a XamMultiColumnComboEditor and added it in a different user control. After that I have added the new user control in my main window and set the DataContext of the layout control in the window and everything goes right. I am attaching a sample application(MultiComboVB.zip).
Let me know, if you need any further assistance on this matter.
Thank you for the quick response.
I will look at this as soon as I can and get back to you if I have any questions.
Hello,
Thank you for your feedback. Let me know, if you need any further assistance on this matter.
Hi Seradex,
Thank you for your reply. I have been looking into your scenario and you can find an approach on how to expose inner controls’ properties to the user control that holds them :
http://stackoverflow.com/questions/4169090/exposing-inner-control-properties-for-binding-in-wpf
Let me know, if you have any other questions on this.
I am working on a sample, but it is difficult to find the time among the myriad of other things I am tasked with doing.
Basically it boils down to how does one bind both the ItemsSource and the SelectedItem to different data. The other problem I had was that you specified the bound field inside the child usercontrol, but I forgot that one can send that data and other properties by creating normal properties of the usercontrol to expose them.
What I had tried with regular WPF controls to expose the binding properties was creating "DependencyProperties" for them in each user control so the binding for both of those could be specified in the main form. Without using this method, I do not know how to send that information down to the grandchild control from the form. The concern I have with using the generic "{Binding}" statement is that it is not explicit and will not allow multiple sources of data to be attached to the form.
For example an order with its details and the list of orders that can be selected, and the list of customers that could be selected when creating a new order, but will be automatically picked via binding when an exiting order is picked.
Hello Saredex,
Thank you for your reply. I have been looking into your scenario and I was wondering whether you can attach a sample application that shows your scenario or modify my applicaton in order to provide you with more accurate assistance ?
Looking forward to hearing from you.
We have reviewed the sample you have submitted and found that it doesn't really appear to meet our needs.
The problem with the sample is that the bound field for the wpf control is specified in the child user control. The reason that doesn't work is that sometimes we will need to put multiple copies of the parent user control on the WPF form. With the field binding information specified in the child user control, we have found no way to bind each parent user control to separate fields.
If there is another way to handle this, please let me know. Note that we have been able to do this with the controls that Microsoft has provided, but do not seem to be able to accomplish this with the Infragistics controls.