using PDF_Office.ViewModels.EditTools.Background;
using PDF_Office.ViewModels.EditTools.Watermark;
using System;
using System.Windows.Controls;
using System.Windows.Media;

namespace PDF_Office.Views.EditTools.Background
{
    /// <summary>
    /// Interaction logic for BackgroundCreateColorContent
    /// </summary>
    public partial class BackgroundCreateColorContent : UserControl
    {
        public BackgroundCreateColorContent()
        {
            InitializeComponent();
            cusColor.SelectedColorHandler += cusColor_SelectedColor;
        }

        private void cusColor_SelectedColor(object sender, Color e)
        {
            var data = this.DataContext as BackgroundCreateColorContentViewModel;
            if (data != null)
            {
                data.ChangeColorCommand?.Execute(e);
            }
        }
    }
}
