Exemple #1
0
        private void Button_Click_MoveDown(object sender, RoutedEventArgs e)
        {
            int index = PluginList.SelectedIndex;

            if (index >= 0)
            {
                IList list = PluginList.ItemsSource as IList;
                if (index < (list.Count - 1))
                {
                    object item = list[index];
                    list.RemoveAt(index);
                    index++;
                    list.Insert(index, item);
                    PluginList.SelectedIndex = index;
                    PluginList.ScrollIntoView(item);
                }
            }
        }