• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class ButtonAppearance

Appearance model for button fields (spec §12.7.4.4). Supports per-trigger caption text (label) and icon (form XObject) so that a push button or toggle button can display different content for the normal, rollover, and down states. The caption text entries map to the appearance-characteristics dictionary (/MK): /CA (normal), /RC (rollover), /AC (alternate/down).

Inheritance
object
ButtonAppearance
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Pdf.Forms
Assembly: DRIT.Pdf.dll
Syntax
public sealed class ButtonAppearance

Properties

BackgroundColor

The background colour of the button (spec §12.7.4.4, /MK /BC).

Declaration
public PdfColor? BackgroundColor { get; set; }
Property Value
Type Description
PdfColor?

BorderColor

The border colour of the button (spec §12.7.4.4, /MK /BS is border style; colour via /BC).

Declaration
public PdfColor? BorderColor { get; set; }
Property Value
Type Description
PdfColor?

Label

The normal-state caption text (spec §12.7.4.4, /MK /CA). When non-null this is written as the button label.

Declaration
public string? Label { get; set; }
Property Value
Type Description
string

Methods

GetIcon(ButtonAppearanceTrigger)

Gets the resource name of the icon form XObject for the specified trigger. Returns null when no icon is set for that trigger.

Declaration
public string? GetIcon(ButtonAppearanceTrigger trigger)
Parameters
Type Name Description
ButtonAppearanceTrigger trigger

The appearance trigger.

Returns
Type Description
string

GetLabel(ButtonAppearanceTrigger)

Gets the caption text for the specified trigger.

Declaration
public string? GetLabel(ButtonAppearanceTrigger trigger)
Parameters
Type Name Description
ButtonAppearanceTrigger trigger

The appearance trigger.

Returns
Type Description
string

The caption text, or null when none is set.

SetIcon(ButtonAppearanceTrigger, string?)

Sets the resource name of the icon form XObject for the specified trigger.

Declaration
public void SetIcon(ButtonAppearanceTrigger trigger, string? iconName)
Parameters
Type Name Description
ButtonAppearanceTrigger trigger

The appearance trigger.

string iconName

The resource name, or null to clear.

SetLabel(ButtonAppearanceTrigger, string?)

Sets the caption text for the specified trigger.

Declaration
public void SetLabel(ButtonAppearanceTrigger trigger, string? label)
Parameters
Type Name Description
ButtonAppearanceTrigger trigger

The appearance trigger.

string label

The caption text, or null to clear.

Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX