コード例 #1
0
        private void DownClick(object sender, RoutedEventArgs e)
        {
            FrameworkElement ele = sender as FrameworkElement;

            if (ele == null)
            {
                return;
            }

            var          alp   = (AlphabetItem)ele.DataContext;
            var          index = Alphabets.IndexOf(alp);
            AlphabetItem tmp   = null;

            if (ActiveAlphabet == alp)
            {
                tmp = alp;
            }
            index--;
            if (index > -1)
            {
                Alphabets.Remove(alp);
                Alphabets.Insert(index, alp);
                if (tmp != null)
                {
                    ActiveAlphabet = alp;
                }
            }


            AlphabetCollectionView.Refresh();
        }