コード例 #1
0
        /// <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
ファイル: Parser.cs プロジェクト: pharring/EditorGuidelines
 public static bool TryParsePosition(string text, out int column)
 => int.TryParse(text, out column) && Guideline.IsValidColumn(column);