private string GetGraphFillColor() { var bgColor = WpfHelper.IdToText( GraphBehind.HasAttribute("bgcolor", true) ? GraphBehind.GetAttribute("bgcolor", true) : null); return(bgColor); }
private string GetGraphPad() { var padStr = WpfHelper.IdToText( GraphBehind.HasAttribute("pad") ? GraphBehind.GetAttribute("pad") : "0.0555"); var padSplit = padStr.Split(',').Select(s => WpfHelper.StringToPixel(s + "in")).ToList(); return(string.Join(",", padSplit.Select(s => s.ToString(CultureInfo.InvariantCulture)))); }
private void UpdatePropertyValues() { Id = GraphBehind.Id; Label = WpfHelper.IdToText( GraphBehind.HasAttribute("label") ? GraphBehind.GetAttribute("label") : null); if (Label != null) { var labelPos = WpfHelper.IdToText(GraphBehind.GetAttribute("lp")) .Split(',') .Select(p => p + "pt") .Select(WpfHelper.StringToPixel) .ToList(); LabelMargin = FormattableString.Invariant($"{labelPos[0]},{labelPos[1]},0,0"); } IsDirected = GraphBehind.IsDirected; FillColor = GetGraphFillColor(); Pad = GetGraphPad(); }