示例#1
0
        private void btn_AddBefore_Click(object sender, RoutedEventArgs e)
        {
            // validar datos
            string item  = tB_ItemToAdd.Text;
            int    index = lV_Items.SelectedIndex;

            if (string.IsNullOrEmpty(item))
            {
                return;
            }
            if (index < 0 || index > list.Size())
            {
                return;
            }
            Node <string> node = list.AtIndex(index);

            // realizar operacion
            list.AddBefore(node, item);
            CUtilities.FillListView(lV_Items, list);
        }