public override void GenerateXmlAttributes(System.Xml.XmlWriter writer) { base.GenerateXmlAttributes(writer); if (FillColor.IsNotWhiteSpace()) { writer.WriteAttributeString("fillColor", FillColor); } if (FillAlpha.HasValue) { writer.WriteAttributeString("FillAlpha", FillAlpha.ToString()); } if (FillRatio.IsNotWhiteSpace()) { writer.WriteAttributeString("FillRatio", FillRatio); } if (FillAngle.IsNotWhiteSpace()) { writer.WriteAttributeString("FillAngle", FillAngle); } if (FillPattern.HasValue) { writer.WriteAttributeString("FillPattern", FillPattern.ToString()); } if (_border != null) { _border.GenerateXmlAttributes(writer); } }
static string GetFillPatternTemplate(FillPattern pattern) { switch (pattern) { case FillPattern.Solid: return(Strings.area_solid); case FillPattern.Net: return(Strings.area_net); case FillPattern.Line: return(Strings.area_line); case FillPattern.Line_45: return(Strings.area_line_45); case FillPattern.Line_90: return(Strings.area_line_90); case FillPattern.Line_135: return(Strings.area_line_135); case FillPattern.Square: return(Strings.area_square); case FillPattern.Box: return(Strings.area_box); case FillPattern.Cross: return(Strings.area_cross); case FillPattern.Dash: return(Strings.area_dash); case FillPattern.Dolmit: return(Strings.area_dolmit); case FillPattern.Hex: return(Strings.area_hex); case FillPattern.Sacncr: return(Strings.area_sacncr); case FillPattern.Steel: return(Strings.area_steel); default: throw new Exception("Unsupported or unrecognized fill pattern: " + pattern.ToString()); } }