/// <summary>
        /// Create a single vertical column guide with the current stroke parameters for
        /// the given column in the current viewport.
        /// </summary>
        /// <param name="column">The columnar position of the new guideline.</param>
        /// <returns>The new vertical column guide.</returns>
        private Line CreateLine(Guideline guideline)
        {
            var strokeParameters = guideline.StrokeParameters ?? _strokeParameters;
            var line             = new Line
            {
                DataContext     = guideline,
                Stroke          = strokeParameters.Brush,
                StrokeThickness = strokeParameters.StrokeThickness,
                StrokeDashArray = strokeParameters.StrokeDashArray
            };

            return(line);
        }
Пример #2
0
 public static bool TryParsePosition(string text, out int column)
 => int.TryParse(text, out column) && Guideline.IsValidColumn(column);