using PDF_Master.ViewModels.EditTools.HeaderFooter; using System.Windows.Controls; using System.Windows.Media; namespace PDF_Master.Views.EditTools.HeaderFooter { /// /// Interaction logic for HeaderFooterCreateContent /// public partial class HeaderFooterCreateContent : UserControl { private HeaderFooterCreateContentViewModel viewModel; public HeaderFooterCreateContent() { InitializeComponent(); viewModel = this.DataContext as HeaderFooterCreateContentViewModel; cusColor.SelectedColorHandler += cusColor_SelectedColor; } private void cusColor_SelectedColor(object sender, Color e) { var data = this.DataContext as HeaderFooterCreateContentViewModel; if (data != null) { data.SelectedColorChangedCommand?.Execute(e); } } private void ADDDate_Click(object sender, System.Windows.RoutedEventArgs e) { viewModel.ADDDateCommand?.Execute(); } private void ADDPages_Click(object sender, System.Windows.RoutedEventArgs e) { viewModel.ADDPagesCommand?.Execute(); } private void Button_Click(object sender, System.Windows.RoutedEventArgs e) { contextMenu.IsOpen = true; } } }