Input Library for WPF
非連結モードでのMultiSelect
Input for WPF > MultiSelect > データの連結 > 非連結モードでのMultiSelect

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#
コードのコピー
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>");
}