|
@@ -72,6 +72,7 @@ namespace PDF_Office.CustomControl.CompositeControl
|
|
|
{
|
|
|
private ObservableCollection<ColorItem> colors = new ObservableCollection<ColorItem>();
|
|
|
public event EventHandler<Color> SelectedColorHandler;
|
|
|
+ public event RoutedEventHandler SelectedColorInvoke;
|
|
|
private ColorItem ChangedColorItem;
|
|
|
|
|
|
/// <summary>
|
|
@@ -114,6 +115,7 @@ namespace PDF_Office.CustomControl.CompositeControl
|
|
|
SelectedColorHandler?.Invoke(this, e.Value);
|
|
|
//ElcustomColor.Fill = new SolidColorBrush(e.Value);
|
|
|
SelectedColor = e.Value;
|
|
|
+ SelectedColorInvoke?.Invoke(e.Value, null);
|
|
|
}
|
|
|
|
|
|
private void ListColor_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
@@ -122,6 +124,7 @@ namespace PDF_Office.CustomControl.CompositeControl
|
|
|
{
|
|
|
var item = ListColor.SelectedItem as ColorItem;
|
|
|
SelectedColorHandler?.Invoke(this, (item.Color as SolidColorBrush).Color);
|
|
|
+ SelectedColorInvoke?.Invoke((item.Color as SolidColorBrush).Color, null);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -130,7 +133,7 @@ namespace PDF_Office.CustomControl.CompositeControl
|
|
|
{
|
|
|
IsExistForContainer((ElcustomColor.Fill as SolidColorBrush).Color);
|
|
|
SelectedColorHandler?.Invoke(this, (ElcustomColor.Fill as SolidColorBrush).Color);
|
|
|
-
|
|
|
+ SelectedColorInvoke?.Invoke((ElcustomColor.Fill as SolidColorBrush).Color, null);
|
|
|
}
|
|
|
|
|
|
private void PnlColor_SelectedColorChanged(object sender, Color? e)
|
|
@@ -165,7 +168,11 @@ namespace PDF_Office.CustomControl.CompositeControl
|
|
|
{
|
|
|
colorIem.RestoreColor();
|
|
|
if(colorIem == ListColor.SelectedItem as ColorItem)
|
|
|
- SelectedColorHandler?.Invoke(this, (colorIem.Color as SolidColorBrush).Color);
|
|
|
+ {
|
|
|
+ SelectedColorHandler?.Invoke(this, (colorIem.Color as SolidColorBrush).Color);
|
|
|
+ SelectedColorInvoke?.Invoke((colorIem.Color as SolidColorBrush).Color, null);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|