Table of Contents

Class OdfFormField

Namespace
OdfKit.Text
Assembly
OdfKit.dll

Represents a facade for a single fillable field in a text document. 表示文字文件中可填入的單一欄位 facade。

public sealed class OdfFormField
Inheritance
OdfFormField
Inherited Members

Properties

Exists

Gets whether the current document contains this field. 取得目前文件是否包含此欄位。

public bool Exists { get; }

Property Value

bool

Key

Gets the field name. 取得欄位名稱。

public string Key { get; }

Property Value

string

Value

Gets or sets the field value; if the field does not exist, setting it will not create a new field. 取得或設定欄位值;若欄位不存在,設定時不會建立新欄位。

public string? Value { get; set; }

Property Value

string

Methods

TrySetValue(string?)

Attempts to set the field value. 嘗試設定欄位值。

public bool TrySetValue(string? value)

Parameters

value string

The value to write. / 要寫入的值。

Returns

bool

true if at least one field was found and updated; otherwise false. / 若找到並更新至少一個欄位則為 true;否則為 false