0

DocX库是否支持复选框控件?我正在浏览课程,但找不到 Checkbox 课程。如何使用 DocX 创建一个复选框?

4

1 回答 1

0

您可以添加复选框符号。

/// <summary>
/// Helper method to handle the special symbol text.
/// </summary>
/// <param name="hex"></param>
/// <returns></returns>
private char HexToChar(string hex)
{
    return (char)ushort.Parse(hex, System.Globalization.NumberStyles.HexNumber);
}

然后,您可以将复选框作为普通文本插入。

// generate a sentence, which includes two checkboxes.
// checkbox Decimal Value is 9722, and Hex Value is 2610
var checkbox = HexToChar("2610");
于 2017-07-06T05:00:41.397 回答