menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class WCheckBox - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class WCheckBox

    Represents the check box in the Word document.

    Inheritance
    System.Object
    OwnerHolder
    XDLSSerializableBase
    Entity
    WidgetBase
    ParagraphItem
    WTextRange
    WField
    WFormField
    WCheckBox
    Implements
    IXDLSSerializable
    IOfficeRun
    IWField
    IWTextRange
    IParagraphItem
    IEntity
    Inherited Members
    Entity.Clone()
    Entity.IsComposite
    Entity.NextSibling
    Entity.Owner
    Entity.PreviousSibling
    OwnerHolder.Document
    OwnerHolder.m_doc
    ParagraphItem.ApplyStyle(String)
    ParagraphItem.CloneRun()
    ParagraphItem.Dispose()
    ParagraphItem.IsDeleteRevision
    ParagraphItem.IsInsertRevision
    ParagraphItem.m_charFormat
    ParagraphItem.OwnerMathRunElement
    ParagraphItem.OwnerParagraph
    WField.ConvertSwitchesToString()
    WField.FieldCode
    WField.FieldPattern
    WField.FieldType
    WField.FieldValue
    WField.GetClonedTable(Entity, Boolean)
    WField.GetTextRange(String)
    WField.m_bConvertedToText
    WField.m_fieldType
    WField.m_fieldValue
    WField.m_formattingString
    WField.m_paraItemType
    WField.m_textFormat
    WField.ParseField(String)
    WField.ParseFieldCode(String)
    WField.ParseFieldFormat(String[])
    WField.RemoveMergeFormat(String)
    WField.RemovePreviousResult()
    WField.RemoveText(String, String)
    WField.ReplaceAllMergeFormatWithEmpty(String)
    WField.SplitIfArguments(String, List<Int32>, String)
    WField.Text
    WField.TextFormat
    WField.Unlink()
    WField.Update()
    WField.UpdateCondition(String, List<Int32>, String)
    WField.UpdateFieldCode(String)
    WField.UpdateTextForParagraphItem(Entity, Boolean)
    WField.UpdateTextForTextBodyItem(Entity, Boolean)
    WFormField.CalculateOnExit
    WFormField.Enabled
    WFormField.FormFieldType
    WFormField.Help
    WFormField.m_curFormFieldType
    WFormField.MacroOnEnd
    WFormField.MacroOnStart
    WFormField.Name
    WFormField.StatusBarHelp
    WTextRange.ApplyCharacterFormat(WCharacterFormat)
    WTextRange.CharacterFormat
    WTextRange.InitXDLSHolder()
    WTextRange.ReadXmlContent(IXDLSContentReader)
    WTextRange.WriteXmlContent(IXDLSContentWriter)
    XDLSSerializableBase.IXDLSSerializable.ReadXmlAttributes(IXDLSAttributeReader)
    XDLSSerializableBase.IXDLSSerializable.ReadXmlContent(IXDLSContentReader)
    XDLSSerializableBase.IXDLSSerializable.RestoreReference(String, Int32)
    XDLSSerializableBase.IXDLSSerializable.WriteXmlAttributes(IXDLSAttributeWriter)
    XDLSSerializableBase.IXDLSSerializable.WriteXmlContent(IXDLSContentWriter)
    XDLSSerializableBase.IXDLSSerializable.XDLSHolder
    XDLSSerializableBase.RestoreReference(String, Int32)
    XDLSSerializableBase.XDLSHolder
    Namespace: Syncfusion.DocIO.DLS
    Assembly: Syncfusion.DocIO.Portable.dll
    Syntax
    public class WCheckBox : WFormField, IXDLSSerializable, IOfficeRun, IStringWidget, ISplitLeafWidget, ITextMeasurable, IWField, IWTextRange, IParagraphItem, IEntity, ILeafWidget, IWidget
    Examples

    The following code illustrates how to add a new checkbox.

    private void Button1_Click(System.Object sender, System.EventArgs e)
    {
        //Create a new Word document 
        WordDocument document = new WordDocument();
        //Add new section to the document
        IWSection section = document.AddSection();
        //Add new paragraph to the section
        WParagraph paragraph = section.AddParagraph() as WParagraph;
        paragraph.AppendText("Gender\t");
        //Append new Checkbox
        WCheckBox checkbox = paragraph.AppendCheckBox();
        checkbox.Checked = false;
        //Set Checkbox size
        checkbox.CheckBoxSize = 10; 
        checkbox.CalculateOnExit = true;
        //Set help text
        checkbox.Help = "Help text";
        paragraph.AppendText("Male\t");
        checkbox = paragraph.AppendCheckBox();
        checkbox.Checked = false;
        checkbox.CheckBoxSize = 10;
        checkbox.CalculateOnExit = true;
        paragraph.AppendText("Female");
        //Save the Word document
        document.Save("Checkbox.docx", FormatType.Docx);
        //Close the document
        document.Close();
    }

    Constructors

    WCheckBox(IWordDocument)

    Initializes a new instance of the WCheckBox class with the specified IWordDocument instance.

    Declaration
    public WCheckBox(IWordDocument doc)
    Parameters
    Type Name Description
    IWordDocument doc

    The IWordDocument instance.

    Properties

    CheckBoxSize

    Gets or sets the size of the checkbox.

    Declaration
    public int CheckBoxSize { get; set; }
    Property Value
    Type Description
    System.Int32

    The integer that specifies the size of checkbox.

    Checked

    Gets or sets a value indicating whether the the checkbox is checked.

    Declaration
    public bool Checked { get; set; }
    Property Value
    Type Description
    System.Boolean

    True if the checked box is checked; otherwise, false.

    DefaultCheckBoxValue

    Gets or sets value indicating whether by default the checkbox is checked or not.

    Declaration
    public bool DefaultCheckBoxValue { get; set; }
    Property Value
    Type Description
    System.Boolean

    True if the checked box is checked by default; otherwise, false.

    EntityType

    Gets the type of the entity.

    Declaration
    public override EntityType EntityType { get; }
    Property Value
    Type Description
    EntityType

    The EntityType of the current item.

    Overrides
    WField.EntityType

    SizeType

    Gets or sets the type of the checkbox size.

    Declaration
    public CheckBoxSizeType SizeType { get; set; }
    Property Value
    Type Description
    CheckBoxSizeType

    The CheckBoxSizeType member that specifies the checkbox size type.

    Methods

    CloneImpl()

    Creates a duplicate copy of the entity.

    Declaration
    protected override object CloneImpl()
    Returns
    Type Description
    System.Object

    A reference to the newly created instance.

    Overrides
    WFormField.CloneImpl()

    CreateLayoutInfo()

    Creates layout information.

    Declaration
    protected override void CreateLayoutInfo()
    Overrides
    WField.CreateLayoutInfo()

    ReadXmlAttributes(IXDLSAttributeReader)

    Reads object data from xml attributes.

    Declaration
    protected override void ReadXmlAttributes(IXDLSAttributeReader reader)
    Parameters
    Type Name Description
    IXDLSAttributeReader reader

    The IXDLSAttributeReader object.

    Overrides
    WFormField.ReadXmlAttributes(IXDLSAttributeReader)

    WriteXmlAttributes(IXDLSAttributeWriter)

    Writes object data as xml attributes.

    Declaration
    protected override void WriteXmlAttributes(IXDLSAttributeWriter writer)
    Parameters
    Type Name Description
    IXDLSAttributeWriter writer

    The IXDLSAttributeWriter object.

    Overrides
    WFormField.WriteXmlAttributes(IXDLSAttributeWriter)

    Implements

    IXDLSSerializable
    IOfficeRun
    IWField
    IWTextRange
    IParagraphItem
    IEntity
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved