Exemple #1
0
        /// <summary>
        /// Selections the did change.
        /// </summary>
        /// <param name="notification">Notification.</param>
        public override void SelectionDidChange(NSNotification notification)
        {
            NSIndexSet selectedIndexes = _controller.SelectedRows;

            // More than one item selected?
            if (selectedIndexes.Count > 1)
            {
                // Not handling this case
            }
            else
            {
                // Grab the item
                var item = _controller.Data.ItemForRow((int)selectedIndexes.FirstIndex);

                // Was an item found?
                if (item != null)
                {
                    // Fire the clicked event for the item
                    item.RaiseClickedEvent();

                    // Inform caller of selection
                    _controller.RaiseItemSelected(item);
                }
            }
        }