跳到主要内容

GetClassType

返回 ApiParaPr 类的类型。

语法

expression.GetClassType();

expression - 表示 ApiParaPr 类的变量。

参数

此方法没有任何参数。

返回值

"paraPr"

示例

此示例获取类类型并将其插入到文档中。

// How to get a class type of ApiParaPr.

// Retrieve class type of ApiParaPr object and insert it to the document.

let doc = Api.GetDocument();
let myStyle = doc.CreateStyle("My document style");
let paraPr = myStyle.GetParaPr();
paraPr.SetLeftBorder("single", 24, 0, 255, 111, 61);
let paragraph = doc.GetElement(0);
paragraph.SetStyle(myStyle);
paragraph.AddText("This is the first paragraph. ");
paragraph.AddText("The paragraph properties styled above set a border at its left side.");
let classType = paraPr.GetClassType();
paragraph = Api.CreateParagraph();
paragraph.AddText("Class Type = " + classType);
doc.Push(paragraph);