|
@@ -0,0 +1,42 @@
|
|
|
+using System;
|
|
|
+using System.Collections.Generic;
|
|
|
+using System.Linq;
|
|
|
+using System.Text;
|
|
|
+using System.Threading.Tasks;
|
|
|
+using System.Windows;
|
|
|
+using System.Windows.Controls;
|
|
|
+using System.Windows.Data;
|
|
|
+using System.Windows.Documents;
|
|
|
+using System.Windows.Input;
|
|
|
+using System.Windows.Media;
|
|
|
+using System.Windows.Media.Imaging;
|
|
|
+using System.Windows.Navigation;
|
|
|
+using System.Windows.Shapes;
|
|
|
+
|
|
|
+namespace PDF_Office.CustomControl.CompositeControl
|
|
|
+{
|
|
|
+ /// <summary>
|
|
|
+ /// ColorSubContent.xaml 的交互逻辑
|
|
|
+ /// </summary>
|
|
|
+ public partial class ColorSubContent : UserControl
|
|
|
+ {
|
|
|
+ public event EventHandler<Color> SelectedColorHandler;
|
|
|
+ public ColorSubContent()
|
|
|
+ {
|
|
|
+ InitializeComponent();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void ElcustomColor_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
|
|
+ {
|
|
|
+ SelectedColorHandler?.Invoke(this, (ElcustomColor.Fill as SolidColorBrush).Color);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void ColorDropPicker_SelectedColorChanged(object sender, Color? e)
|
|
|
+ {
|
|
|
+
|
|
|
+ SelectedColorHandler?.Invoke(this, e.Value);
|
|
|
+ ElcustomColor.Fill = new SolidColorBrush(e.Value);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|