In unbound mode, you can populate the control with data by generating its content. For generating content, you need to add items either at design time, or at run time.
The following code populates the MultiSelect control with customer names when the application loads at runtime.
C# |
Copy Code
|
---|---|
private void Window_Loaded(object sender, RoutedEventArgs e) { mselect.Items.Add("Ed Cullen <ed.cullen@hotmail.com>"); mselect.Items.Add("Daryl Grimes<grimes.daryl@hotmail.com>"); } |