/// <summary> /// /// </summary> private void OnItemSelected(StackListItemBase stackListItem) { if (_selectedStackListItem != null) { _selectedStackListItem.Deselected(); } _selectedStackListItem = stackListItem; _selectedStackListItem.Selected(); SelectedItem = stackListItem.BindingContext; }
/// <summary> /// /// </summary> /// <param name="item"></param> /// <returns></returns> private StackListItemBase PrepareSingleItem(object item) { try { StackListItemBase stackListItem = (StackListItemBase)ItemTemplate.CreateContent(); stackListItem.SelectionAction = OnItemSelected; stackListItem.BindingContext = item; return(stackListItem); } catch (Exception exc) { throw new InvalidOperationException( string.Format("StackList.PrepareSingleItem - {0}. Excaption details - {1}", _ERORR_LAYOUT_FILLING, exc.Message)); } }