Hi,
Yes you can.
Simply override the ToString() method to display the property you wish :
Also, if you change a property that is used in the ToString() method, if you wish to see the update in the left ListBox, you will need v3.0 and up
Please note that the current version for the
Yes you can.
Simply override the ToString() method to display the property you wish :
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Button_Click( object sender, RoutedEventArgs e )
{
var dialog = new CollectionControlDialog( typeof( Person ), new List<Type>() { typeof( Person ) } );
dialog.ItemsSource = new List<Person>() { new Person() { FirstName = "Tom", LastName = "Smith", Age = 35 } };
dialog.Show();
}
}
public class Person
{
public Person()
{
}
public string FirstName
{
get;
set;
}
public string LastName
{
get;
set;
}
public int Age
{
get;
set;
}
public override string ToString()
{
return this.FirstName;
}
}
But this will work in v2.1 and up.Also, if you change a property that is used in the ToString() method, if you wish to see the update in the left ListBox, you will need v3.0 and up
Please note that the current version for the
- Plus users is : v3.0
- Community users is : v2.6 (v2.7 will soon be released)