Пример #1
0
        private string GetGraphFillColor()
        {
            var bgColor = WpfHelper.IdToText(
                GraphBehind.HasAttribute("bgcolor", true)
                    ? GraphBehind.GetAttribute("bgcolor", true)
                    : null);

            return(bgColor);
        }
Пример #2
0
        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))));
        }
Пример #3
0
 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();
 }