コード例 #1
0
        /// <summary>
        /// Gets the line style associated with a line.
        /// </summary>
        /// <param name="lineIndex">Index of the line.</param>
        /// <param name="lineContexts">The line contexts.</param>
        /// <returns></returns>
        public virtual LineBlockStyle GetLineStyle(
            int lineIndex,
            LineContexts lineContexts)
        {
            // Get the style name and normalize it.
            string styleName = LineBuffer.GetLineStyleName(lineIndex, lineContexts);

            if (String.IsNullOrEmpty(styleName))
            {
                styleName = Theme.TextStyle;
            }

            // Retrieve the style.
            return(DisplayContext.Theme.LineStyles[styleName]);
        }