Beispiel #1
0
        /// <summary>
        /// Move selected items to back (end of the list)
        /// </summary>
        /// <returns>
        /// true if at least one object is moved
        /// </returns>
        public bool MoveSelectionToBack()
        {
            int n        = _graphicsList.Count;
            var tempList = new ArrayList();

            for (int i = n - 1; i >= 0; i--)
            {
                if (((DrawObject)_graphicsList[i]).Selected)
                {
                    tempList.Add(_graphicsList[i]);
                }
            }

            var cmd = new SendToBackCommand(_graphicsList, tempList);

            cmd.Execute();
            _undoRedo.AddCommand(cmd);

            return(true);
        }
Beispiel #2
0
 private void SelectedItemsOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs)
 {
     BringToFrontCommand.RaiseCanExecuteChanged();
     SendToBackCommand.RaiseCanExecuteChanged();
 }