[]
Represents fill formatting for a shape or chart element.
Use this interface to inspect and modify fill settings such as solid color, pattern, gradient, texture, transparency, and visibility for a drawing object. Instances of this interface are typically obtained from a public formatting API such as Fill.
public interface IFillFormat
Public Interface IFillFormat
IShape shape = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 20, 20, 100, 60);
IFillFormat fillFormat = shape.Fill;
fillFormat.Solid();
fillFormat.Color.RGB = Color.Blue;
| Name | Description |
|---|---|
| Color | Returns the IColorFormat object that represents the specified foreground color. Use the returned IColorFormat to inspect or modify the color used by the current fill. |
| GradientAngle | Gets or sets the angle of the gradient fill for the specified fill format. Use this property to get or set the direction of a gradient that has been applied to the fill. |
| GradientDegree | Returns the gradient degree of the specified one-color shaded fill as a floating-point value from 0.0 (dark) through 1.0 (light). Use this property to retrieve the shading intensity that was applied by OneColorGradient(GradientStyle, int, double). |
| GradientPathType | Gets or sets the path type for the gradient fill. |
| GradientStops | Returns the collection of gradient stops for the gradient fill. |
| GradientStyle | Returns the gradient style for the specified fill. |
| GradientVariant | Returns the shade variant for the specified fill as an integer value from 1 through 4. The returned value corresponds to the gradient variant used by the current fill settings. |
| Pattern | Returns the fill pattern. Use this method to retrieve the PatternType applied to the shape's fill after the fill has been configured as a pattern fill. |
| PatternColor | Returns the IColorFormat object that represents the specified pattern color. Use this property to read or modify the foreground color used by a pattern fill. To apply a pattern fill first, use Patterned(PatternType). |
| PresetGradientType | Returns the preset gradient type for the specified fill. |
| PresetTexture | Returns the preset texture for the specified fill. |
| RotateWithObject | Gets or sets whether the fill style should rotate with the object. This property indicates whether the current fill style follows the object's rotation. |
| TextureAlignment | Gets or sets the alignment of the texture fill for the specified IFillFormat. This property specifies the origin of the coordinate grid used to tile the texture fill. |
| TextureHorizontalScale | Gets or sets the value for horizontally scaling the text for the IFillFormat. Use this property to retrieve the horizontal scale applied to the current texture fill. |
| TextureOffsetX | Gets or sets the offset X value for the specified fill. Use this property to retrieve the horizontal tile offset applied to the current texture fill. If this value is not set on the current fill and a parent fill exists, the inherited value is returned. |
| TextureOffsetY | Gets or sets the offset Y value for the specified fill. Use this property to read the vertical offset applied to a texture fill layout. |
| TextureVerticalScale | Gets or sets the texture vertical scale for the specified fill. Use this property to retrieve the vertical scale applied to the current texture fill. |
| Transparency | Gets or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) to 1.0 (fully transparent). |
| Type | Returns the fill type. Use this method to determine which kind of fill is currently applied to the object, such as solid, patterned, gradient, textured, picture, or group fill. |
| Visible | Gets or sets whether the object is visible. Use this property to show or hide the fill for the shape, or to check whether it is currently displayed. |
| Name | Description |
|---|---|
| OneColorGradient(GradientStyle, int, double) | Sets the specified fill to a one-color gradient.
Use this method to apply a gradient that varies a single color from dark to light.
The |
| Patterned(PatternType) | Sets the specified fill to a pattern. Use this method to apply a PatternType fill to a shape. After the pattern is set, you can customize the background color and pattern color through Color and PatternColor. |
| PresetGradient(GradientStyle, int, PresetGradientType) | Sets the specified fill to a preset gradient. Use this method to apply one of the built-in gradient presets to a shape fill. |
| PresetTextured(PresetTexture) | Sets the specified fill format to a preset texture. Use this method to apply one of the built-in PresetTexture values to a shape fill. After applying the texture, you can further adjust the texture layout by using methods such as TextureAlignment. |
| Solid() | Sets the specified fill to a uniform color. After calling this method, use Color to configure the solid fill color. |
| TwoColorGradient(GradientStyle, int) | Sets the specified fill to a two-color gradient. Use this method to apply a gradient fill that blends between two colors. After calling this method, configure the gradient colors through the fill's color settings. |
| UserPicture(Stream, ImageType) | Fills the specified shape with an image. Use this method to apply a picture fill from a Stream. Specify the image format with the ImageType parameter. |
| UserPicture(string) | Fills the specified shape with an image. Use this method to apply an image file as the fill for a shape. To fill the shape with small tiles of an image, use UserTextured(string). |
| UserTextured(Stream, ImageType) | Fills the specified shape with small tiles of an image.
Use this method to apply a texture fill from an image stream. The
|
| UserTextured(string) | Fills the specified shape with small tiles of an image. Use this method to apply a texture fill from an image file. The image is tiled across the shape instead of being stretched as a single picture. |