public GridLine AddLine(double location, double? thickness = null, Color? color = null) {
   Pen pen = null;
   if(thickness.HasValue || color.HasValue) {
     pen = new Pen(new SolidColorBrush(color ?? Colors.Silver), thickness ?? 1);
   }
   GridLine line = new GridLine(location, pen);
   _gridlines.Add(line);
   return line;
 }
Example #2
0
        public GridLine AddLine(double location, double?thickness = null, Color?color = null)
        {
            Pen pen = null;

            if (thickness.HasValue || color.HasValue)
            {
                pen = new Pen(new SolidColorBrush(color ?? Colors.Silver), thickness ?? 1);
            }
            GridLine line = new GridLine(location, pen);

            _gridlines.Add(line);
            return(line);
        }