예제 #1
0
        /// <summary>
        ///
        /// </summary>
        private void OnItemSelected(StackListItemBase stackListItem)
        {
            if (_selectedStackListItem != null)
            {
                _selectedStackListItem.Deselected();
            }

            _selectedStackListItem = stackListItem;
            _selectedStackListItem.Selected();

            SelectedItem = stackListItem.BindingContext;
        }
예제 #2
0
        /// <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));
            }
        }