menu

Xamarin.Forms

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

    Show / Hide Table of Contents

    Class Background

    Represents the background effects.

    Inheritance
    System.Object
    OwnerHolder
    XDLSSerializableBase
    Background
    Implements
    IXDLSSerializable
    Inherited Members
    OwnerHolder.Document
    OwnerHolder.m_doc
    XDLSSerializableBase.CloneImpl()
    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 Background : XDLSSerializableBase, IXDLSSerializable

    Properties

    Color

    Gets or sets the background color of the document.

    Declaration
    public Color Color { get; set; }
    Property Value
    Type Description
    Color

    The System.Drawing.Color specifies the background color for this document.

    Examples
    private void Button1_Click(System.Object sender, System.EventArgs e)
    {
        //Load an existing Word document into WordDocument instance
        WordDocument document = new WordDocument("Sample.docx");
        //Set the background type of the document
        document.Background.Type = BackgroundType.Color;
        //Set the background color of the document
        document.Background.Color = Color.AliceBlue;
        //Save the document in the given name and format
        document.Save("Document.docx", FormatType.Docx);
        //Release the resources occupied by WordDocument instance
        document.Close(); 
    }
    Private Sub button_Click(sender As Object, e As EventArgs)
        'Load an existing Word document into WordDocument instance
        Dim document As New WordDocument("Sample.docx")
        'Set the background type of the document
        document.Background.Type = BackgroundType.Color
        'Set the background color of the document
        document.Background.Color = Color.AliceBlue
        'Save the document in the given name and format
        document.Save("Document.docx", FormatType.Docx)
        'Release the resources occupied by WordDocument instance
        document.Close()
    End Sub

    Gradient

    Gets or sets the background gradient.

    Declaration
    public BackgroundGradient Gradient { get; set; }
    Property Value
    Type Description
    BackgroundGradient

    The BackgroundGradient object that specifies the gradient effect.

    See Also
    BackgroundGradient

    Picture

    Gets or sets the background picture.

    Declaration
    public byte[] Picture { get; set; }
    Property Value
    Type Description
    System.Byte[]

    The byte array contains the picture data that represents the background for the document.

    Type

    Gets or sets the type of background effect.

    Declaration
    public BackgroundType Type { get; set; }
    Property Value
    Type Description
    BackgroundType

    The BackgroundType member that specifies the type of background.

    Methods

    InitXDLSHolder()

    Registers child objects in XDSL holder.

    Declaration
    protected override void InitXDLSHolder()
    Overrides
    XDLSSerializableBase.InitXDLSHolder()

    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
    XDLSSerializableBase.ReadXmlAttributes(IXDLSAttributeReader)

    ReadXmlContent(IXDLSContentReader)

    Reads object data from xml attributes.

    Declaration
    protected override bool ReadXmlContent(IXDLSContentReader reader)
    Parameters
    Type Name Description
    IXDLSContentReader reader

    The IXDLSContentReader object.

    Returns
    Type Description
    System.Boolean

    The value indicating the presence of xml content.

    Overrides
    XDLSSerializableBase.ReadXmlContent(IXDLSContentReader)

    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
    XDLSSerializableBase.WriteXmlAttributes(IXDLSAttributeWriter)

    WriteXmlContent(IXDLSContentWriter)

    Writes object data as inside xml element.

    Declaration
    protected override void WriteXmlContent(IXDLSContentWriter writer)
    Parameters
    Type Name Description
    IXDLSContentWriter writer

    The IXDLSContentWriter object.

    Overrides
    XDLSSerializableBase.WriteXmlContent(IXDLSContentWriter)

    Implements

    IXDLSSerializable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved