Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / Fill Class
Members Example


In This Topic
    Fill Class
    In This Topic
    Contains the properties related to filling a CellRowColumn or range with a Color and a pattern.   
    Syntax
    'Declaration
     
    
    Public Class Fill 
       Inherits Xceed.Workbooks.NET.StyleBase(Of IReadonlyFill)
       Implements IReadonlyFill 
    'Usage
     
    
    Dim instance As Fill
    Remarks
    This class derives from StyleBase<IReadonlyFill> and IReadonlyFill.
    Example
    using( var workbook = Workbook.Create( "test.xlsx" ) )
      {
        // Get the first worksheet. A workbook contains at least 1 worksheet.
        var cellWorksheet = workbook.Worksheets[ 0 ];
    
        // Set fill style for cell C12.
        cellWorksheet.Cells[ "C12" ].Style.Fill = new Fill() { PatternStyle = FillPattern.ThinDiagonalCrosshatch, PatternColor = Color.Green,  BackgroundColor = Color.Blue };
        // Set Cell C12 content.
        cellWorksheet.Cells[ "C12" ].Value = "Testing Fill Pattern";
    
        // Save workbook to disk.
        workbook.Save();
      }
    Inheritance Hierarchy

    System.Object
       Xceed.Workbooks.NET.StyleBase<T>
          Xceed.Workbooks.NET.Fill

    Public Constructors
     NameDescription
    Public ConstructorCreates an empty Fill object.  
    Top
    Public Properties
     NameDescription
    Public PropertyGets or sets the Color used for filling the background of a CellRowColumn or range.  
    Public PropertyGets or sets the ThemeColor used for filling the background of a CellRowColumn or range.    
    Public PropertyGets or sets the Color of the pattern used for filling a CellRowColumn or range.  
    Public PropertyGets or sets the Style of the pattern used for filling a CellRowColumn or range.  
    Public Property

    Gets or sets the ThemeColor of the pattern used for filling a CellRowColumn or range.

     
    Top
    Public Methods
     NameDescription
    Public MethodDetermines whether the specified System.Object is equal to the current System.Object.   
    Public MethodServes as a hash function for a particular type.  
    Top
    Protected Methods
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also