Accordion.Forms.AccordionControl.OnCellTouchUpInside C# (CSharp) Méthode

OnCellTouchUpInside() public méthode

Raises the cell touch up inside event.
public OnCellTouchUpInside ( int cellIndex ) : void
cellIndex int cell index.
Résultat void
        void OnCellTouchUpInside(int cellIndex)
        {
            var touchedEntry = m_entries[cellIndex];
            bool isTouchingToClose = touchedEntry.IsOpen;

            var entriesToClose = m_entries.Where(e => e.IsOpen);
            foreach (var entry in entriesToClose)
            {
                CloseAccordion(entry);
                entry.IsOpen = false;
            }

            if (!isTouchingToClose)
            {
                OpenAccordion(touchedEntry);
                touchedEntry.IsOpen = true;
            }
        }