using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using Telerik.Windows.Controls;

namespace WpfApp
{
    public class ViewModel : ViewModelBase
    {

        private RadDiagramShape selectedShape;
        public RadDiagramShape SelectedShape
        {
            get => selectedShape;
            set
            {
                selectedShape = value;
                OnPropertyChanged("SelectedShape");
            }
        }

        public ICommand OnClickCommand
        {
            get => new DelegateCommand(x =>
            {
                if (SelectedShape != null)
                {
                    SelectedShape.Background = new BrushConverter().ConvertFromString("#FFFFFF90") as SolidColorBrush;
                    //SelectedShape.Background = new SolidColorBrush(Colors.Blue);
                }
                else
                {
                    MessageBox.Show("Please Select Shape");
                }
            });
        }

    }
}
