Reputation: 3284
I have two 'ListPicker' controls. How could I make it so that after user changes 'SelectedValue' property of one of these controls a corresponding property of a second control would also change?
Can someone please provide us a example?
Thanks a lot
Upvotes: 0
Views: 194
Reputation:
you can set select item like this code.when you fill list at the time you can set selected item property.
private void FillAssetType(int assetTypeID)
{
List<TbAssetType> lst = Asset.GetAssetType();
TbAssetType tb = new TbAssetType { AssetTypeName = "Select Asset Type" };
lst.Insert(0, tb);
lstpickAssetType.ItemsSource = lst;
lstpickAssetType.SelectedItem = lst.Where(p => p.AssetTypeID == assetTypeID).FirstOrDefault();
}
Upvotes: 1