|
@@ -165,14 +165,14 @@ namespace Compdfkit_Tools.PDFControlUI
|
|
|
CPDFOpacityControl.OpacityValue = (int)((double)annotAttribEvent.Attribs[AnnotAttrib.Transparency] * 100);
|
|
|
CPDFThicknessControl.Thickness = Convert.ToInt16(annotAttribEvent.Attribs[AnnotAttrib.Thickness]);
|
|
|
NoteTextBox.Text = (string)annotAttribEvent.Attribs[AnnotAttrib.NoteText];
|
|
|
- if(annotAttribEvent.Attribs!=null && annotAttribEvent.Attribs.ContainsKey(AnnotAttrib.Color))
|
|
|
+ if (annotAttribEvent.Attribs != null && annotAttribEvent.Attribs.ContainsKey(AnnotAttrib.Color))
|
|
|
{
|
|
|
- BorderColorPickerControl.SetCheckedForColor((Color)annotAttribEvent.Attribs[AnnotAttrib.Color]);
|
|
|
+ BorderColorPickerControl.Loaded += BorderColorPickerControl_Loaded;
|
|
|
}
|
|
|
|
|
|
if (annotAttribEvent.Attribs != null && annotAttribEvent.Attribs.ContainsKey(AnnotAttrib.FillColor))
|
|
|
{
|
|
|
- FillColorPickerControl.SetCheckedForColor((Color)annotAttribEvent.Attribs[AnnotAttrib.FillColor]);
|
|
|
+ FillColorPickerControl.Loaded += FillColorPickerControl_Loaded;
|
|
|
}
|
|
|
|
|
|
CPDFLineStyleControl.DashStyle = (DashStyle)(annotAttribEvent.Attribs[AnnotAttrib.LineStyle]);
|
|
@@ -189,12 +189,24 @@ namespace Compdfkit_Tools.PDFControlUI
|
|
|
HeadLineType = (C_LINE_TYPE)annotAttribEvent.Attribs[AnnotAttrib.LineStart],
|
|
|
TailLineType = (C_LINE_TYPE)annotAttribEvent.Attribs[AnnotAttrib.LineEnd]
|
|
|
};
|
|
|
- CPDFArrowControl.LineType = lineType;
|
|
|
+ CPDFArrowControl.LineType = lineType;
|
|
|
}
|
|
|
this.annotAttribEvent = annotAttribEvent;
|
|
|
CPDFAnnotationPreviewerControl.DrawShapePreview(GetShapeData());
|
|
|
}
|
|
|
|
|
|
+ private void FillColorPickerControl_Loaded(object sender, RoutedEventArgs e)
|
|
|
+ {
|
|
|
+ FillColorPickerControl.SetCheckedForColor((Color)annotAttribEvent.Attribs[AnnotAttrib.FillColor]);
|
|
|
+ FillColorPickerControl.Loaded -= FillColorPickerControl_Loaded;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void BorderColorPickerControl_Loaded(object sender, RoutedEventArgs e)
|
|
|
+ {
|
|
|
+ BorderColorPickerControl.SetCheckedForColor((Color)annotAttribEvent.Attribs[AnnotAttrib.Color]);
|
|
|
+ BorderColorPickerControl.Loaded -= BorderColorPickerControl_Loaded;
|
|
|
+ }
|
|
|
+
|
|
|
public void InitWhenRectAndRound()
|
|
|
{
|
|
|
FillColorStackPanel.Visibility = Visibility.Visible;
|