lp.ItemsSource=new string[]{"hello", "world"};//no problem with this code.
//after I set a non-empty collection to lp,an exception came up when I set a empty collection or null to lp at the second time.
lp.ItemsSource=new string[0];
these code don't have any problem.
lp.ItemsSource=new string[0];//set an empty or null collection at first.
lp.ItemsSource=new string[0];
lp.ItemsSource=null;
//after I set a non-empty collection to lp,an exception came up when I set a empty collection or null to lp at the second time.
lp.ItemsSource=new string[0];
these code don't have any problem.
lp.ItemsSource=new string[0];//set an empty or null collection at first.
lp.ItemsSource=new string[0];
lp.ItemsSource=null;