Search Wiki:
Resource Page Description
This short sample shows how to bind multiple fields from a table (like first and last name) to a ComboBox in a WPF application. This is a pretty common pattern as one would usually store those values in different fields in a table but wants to show them together in the running application. The trick in this example is to nest a TextBlock in the ComboBox which can be used to bind multiple values to (through the Multibinding Class).

Multibinding in WPF.png

Additional Resources
WPF - Data Binding Overview
How do I bind multiple values to a ComboBox in a Windows Forms application (e.g First/Last Name)?

The examples were created using Visual Basic 2008 Express/Visual C# 2008 Express.


my blog
my code samples

P.S.: Please let me mw know if this code was helpful or not. If not, I’d appreciate if you could tell me what you were expecting. Thanks very much!
Last edited Oct 21 2009 at 8:07 PM  by Daniel_Walzenbach, version 6
Page view tracker