|
@@ -28,7 +28,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
if (value is DashStyle)
|
|
|
{
|
|
|
var dash = value as DashStyle;
|
|
|
- if (dash.Dashes.Count == 0 || dash.Dashes[0] == 0)
|
|
|
+ if (dash.Dashes == null || dash.Dashes.Count == 0 || dash.Dashes[0] == 0)
|
|
|
{
|
|
|
return DashStyles.Solid.Dashes;
|
|
|
}
|
|
@@ -151,15 +151,23 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
set
|
|
|
{
|
|
|
SetProperty(ref dash, value);
|
|
|
- if(dash.Dashes[0] == 0)
|
|
|
+ if(dash.Dashes != null && dash.Dashes.Count > 0)
|
|
|
{
|
|
|
- AnnotEvent?.UpdateAttrib(AnnotAttrib.LineStyle, DashStyles.Solid);
|
|
|
+ if (dash.Dashes[0] == 0)
|
|
|
+ {
|
|
|
+ AnnotEvent?.UpdateAttrib(AnnotAttrib.LineStyle, DashStyles.Solid);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ AnnotEvent?.UpdateAttrib(AnnotAttrib.LineStyle, dash);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- AnnotEvent?.UpdateAttrib(AnnotAttrib.LineStyle, dash);
|
|
|
+ AnnotEvent?.UpdateAttrib(AnnotAttrib.LineStyle, DashStyles.Solid);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
AnnotEvent?.UpdateAnnot();
|
|
|
}
|
|
|
}
|
|
@@ -426,6 +434,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
BorderOpacity = Square.Transparency;
|
|
|
FillOpacity = Square.Transparency;
|
|
|
LineWidth = Square.LineWidth;
|
|
|
+ Dash = Square.LineDash;
|
|
|
SharpsType("Rect",true);
|
|
|
|
|
|
}
|
|
@@ -440,6 +449,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
BorderOpacity = Circle.Transparency;
|
|
|
FillOpacity = Circle.Transparency;
|
|
|
LineWidth = Circle.LineWidth;
|
|
|
+ Dash = Circle.LineDash;
|
|
|
SharpsType("Circle", true);
|
|
|
}
|
|
|
break;
|
|
@@ -453,6 +463,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
BorderOpacity = line.Transparency;
|
|
|
FillOpacity = line.Transparency;
|
|
|
LineWidth = line.LineWidth;
|
|
|
+ Dash = line.LineDash;
|
|
|
|
|
|
if (line.TailLineType == C_LINE_TYPE.LINETYPE_ARROW && line.HeadLineType == C_LINE_TYPE.LINETYPE_NONE)
|
|
|
SharpsType("Arrow", true);
|