WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class FillStyle - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class FillStyle

    A FillStyle is a collection of properties that define a brush used for fill operations during rendering.

    Inheritance
    System.Object
    PropertyContainer
    FillStyle
    BackgroundStyle
    Implements
    IServiceReferenceHolder
    IServiceReferenceProvider
    IPropertyObserver
    IPropertyContainer
    System.ICloneable
    System.Runtime.Serialization.ISerializable
    System.IDisposable
    Inherited Members
    PropertyContainer.m_propertyObserver
    PropertyContainer.UpdateServiceReferences(IServiceReferenceProvider)
    PropertyContainer.ProvideServiceReference(RuntimeTypeHandle)
    PropertyContainer.RecordPropertyChanged(String)
    PropertyContainer.OnPropertyChanging(String, Object)
    PropertyContainer.OnPropertyChanged(String)
    PropertyContainer.GetPropertyContainerByName(String)
    PropertyContainer.OnMeasureUnitsChanging(MeasureUnits, MeasureUnits)
    PropertyContainer.ISerializable.GetObjectData(SerializationInfo, StreamingContext)
    PropertyContainer.IPropertyObserver.OnPropertyChanging(String, String, Object)
    PropertyContainer.IPropertyObserver.OnPropertyChanged(String, String)
    PropertyContainer.PropertyObserber
    PropertyContainer.HistoryService
    PropertyContainer.FullContainerName
    System.Object.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Diagram
    Assembly: Syncfusion.Diagram.Base.dll
    Syntax
    public class FillStyle : PropertyContainer, IServiceReferenceHolder, IServiceReferenceProvider, IPropertyObserver, IPropertyContainer, ICloneable, ISerializable, IDisposable

    Constructors

    FillStyle()

    Initializes a new instance of the FillStyle class.

    Declaration
    public FillStyle()

    FillStyle(FillStyle)

    Initializes a new instance of the FillStyle class.

    Declaration
    public FillStyle(FillStyle src)
    Parameters
    Type Name Description
    FillStyle src

    The SRC.

    FillStyle(SerializationInfo, StreamingContext)

    Initializes a new instance of the FillStyle class.

    Declaration
    protected FillStyle(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    The info.

    System.Runtime.Serialization.StreamingContext context

    The context.

    Properties

    Color

    Gets or sets color to use for the brush.

    Declaration
    public Color Color { get; set; }
    Property Value
    Type Description
    System.Drawing.Color
    Remarks

    NOTE: If Type is set to FillType.LinearGradient, then this is the ending color for the gradient.

    ColorAlphaFactor

    Gets or sets alpha blending factor.

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

    ForeColor

    Gets or sets the foreground color used for the fill style.

    Declaration
    public Color ForeColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color
    Remarks

    NOTE: If Type is set to FillType.LinearGradient, then this is the starting color for the gradient.

    ForeColorAlphaFactor

    Gets or sets alpha blending factor for the ForeColor.

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

    GradientAngle

    Gets or sets angle used for gradient fill.

    Declaration
    public float GradientAngle { get; set; }
    Property Value
    Type Description
    System.Single

    GradientCenter

    Gets or sets a value from 0 through 1 that specifies the center of the gradient.

    Declaration
    public float GradientCenter { get; set; }
    Property Value
    Type Description
    System.Single

    HatchBrushStyle

    Gets or sets hatch brush style to create for filled regions.

    Declaration
    public HatchStyle HatchBrushStyle { get; set; }
    Property Value
    Type Description
    System.Drawing.Drawing2D.HatchStyle

    InheritContainerMeasureUnits

    Gets or sets a value indicating whether [inherit container measure units].

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

    true if need to inherit container measure units; otherwise, false.

    Overrides
    PropertyContainer.InheritContainerMeasureUnits

    MeasureUnit

    Gets or sets the measure unit.

    Declaration
    public override MeasureUnits MeasureUnit { get; set; }
    Property Value
    Type Description
    MeasureUnits

    The measure unit.

    Overrides
    PropertyContainer.MeasureUnit

    PathBrushStyle

    Gets or sets the path brush style.

    Declaration
    public PathGradientBrushStyle PathBrushStyle { get; set; }
    Property Value
    Type Description
    PathGradientBrushStyle

    The path brush style.

    Texture

    Gets or sets image to use for texture fill.

    Declaration
    public Image Texture { get; set; }
    Property Value
    Type Description
    System.Drawing.Image

    TextureWrapMode

    Gets or sets the mode how the texture is wrapped if fill type is set to texture.

    Declaration
    public WrapMode TextureWrapMode { get; set; }
    Property Value
    Type Description
    System.Drawing.Drawing2D.WrapMode

    Type

    Gets or sets type of brush to create for filled regions.

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

    Methods

    Clone()

    Clones this instance.

    Declaration
    public override object Clone()
    Returns
    Type Description
    System.Object

    The cloned object.

    Overrides
    PropertyContainer.Clone()

    CreateBrush(Graphics, RectangleF)

    Creates a new brush based on the properties contained by the FillStyle object.

    Declaration
    public Brush CreateBrush(Graphics grfx, RectangleF fillBounds)
    Parameters
    Type Name Description
    System.Drawing.Graphics grfx

    Graphics context the brush will be used in.

    System.Drawing.RectangleF fillBounds

    Bounds of the object to be filled (needed for gradient brushes only).

    Returns
    Type Description
    System.Drawing.Brush

    A GDI+ brush object.

    Dispose()

    Declaration
    public override void Dispose()
    Overrides
    PropertyContainer.Dispose()

    Equals(Object)

    Determines whether the specified System.Object is equal to the current System.Object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj

    The System.Object to compare with the current System.Object.

    Returns
    Type Description
    System.Boolean

    true if the specified System.Object is equal to the current System.Object; otherwise, false.

    Overrides
    System.Object.Equals(System.Object)
    Exceptions
    Type Condition
    System.NullReferenceException

    The obj parameter is null.

    GetHashCode()

    Serves as a hash function for a particular type.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    A hash code for the current System.Object.

    Overrides
    System.Object.GetHashCode()

    GetObjectData(SerializationInfo, StreamingContext)

    Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.

    Declaration
    protected override void GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    The System.Runtime.Serialization.SerializationInfo to populate with data.

    System.Runtime.Serialization.StreamingContext context

    The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.

    Overrides
    PropertyContainer.GetObjectData(SerializationInfo, StreamingContext)
    Exceptions
    Type Condition
    System.Security.SecurityException

    The caller does not have the required permission.

    GetPropertyContainerName()

    Gets the name of the property container.

    Declaration
    protected override string GetPropertyContainerName()
    Returns
    Type Description
    System.String

    Property container name.

    Overrides
    PropertyContainer.GetPropertyContainerName()

    ShouldSerializeColor()

    Shows whether Color will be serializable.

    Declaration
    protected bool ShouldSerializeColor()
    Returns
    Type Description
    System.Boolean

    true, if serialize color.

    ShouldSerializeForeColor()

    Shows whether ForeColor will be serializable.

    Declaration
    protected bool ShouldSerializeForeColor()
    Returns
    Type Description
    System.Boolean

    true, if serialize forecolor.

    Implements

    IServiceReferenceHolder
    IServiceReferenceProvider
    IPropertyObserver
    IPropertyContainer
    System.ICloneable
    System.Runtime.Serialization.ISerializable
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved