跳到主要内容

IsDropDownList

检查内容控件是否为下拉列表。

语法

expression.IsDropDownList();

expression - 表示 ApiInlineLvlSdt 类的变量。

参数

此方法没有任何参数。

返回值

boolean

示例

检查文档中的内容控件是否为下拉列表。

// How can I is drop down list using an inline content control in a document?

// Is drop down list for an inline content control in a document.

let doc = Api.GetDocument();
let inlineControl = doc.AddDropDownListContentControl();
let isDropDown = inlineControl.IsDropDownList();
let paragraph = Api.CreateParagraph();
paragraph.AddText("Is this content control a dropdown list? " + isDropDown);
doc.Push(paragraph);