Xwt.Drawing.TextLayout.SetUnderline C# (CSharp) Method

SetUnderline() public method

Underlines a part of text inside the T:Xwt.Drawing.TextLayout object.
public SetUnderline ( int startIndex, int count ) : void
startIndex int Start index of the first character to underline.
count int The number of characters to underline.
return void
		public void SetUnderline (int startIndex, int count)
		{
			AddAttribute (new UnderlineTextAttribute () { StartIndex = startIndex, Count = count});
		}

Usage Example

Ejemplo n.º 1
0
        int DrawLinePortion(Context cr, ChunkStyle style, TextLayout layout, DocumentLine line, int visualOffset, int logicalLength)
        {
            int logicalColumn = line.GetLogicalColumn(editor, visualOffset);
            int logicalEndColumn = logicalColumn + logicalLength;
            int visualEndOffset = line.GetVisualColumn(editor, logicalEndColumn);

            int visualLength = visualEndOffset - visualOffset;

            int indexOffset = visualOffset - 1;

            layout.SetFontStyle(style.FontStyle, indexOffset, visualLength);
            layout.SetFontWeight(style.FontWeight, indexOffset, visualLength);
            if (style.Underline)
                layout.SetUnderline(indexOffset, visualLength);
            layout.SetForeground(style.Foreground, indexOffset, visualLength);

            return visualEndOffset;
        }
All Usage Examples Of Xwt.Drawing.TextLayout::SetUnderline