[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.Shape.ApplyPreset

ApplyPreset Method

ApplyPreset(ShapePreset)

Applies a predefined fill and outline (ShapePreset) to this shape.

Note that ShapePresets cannot be applied to line geometries (see IsLineGeometry(GeometryType)). If GeometryType of this shape is a line geometry, this method will do nothing and return false. For line geometries use ApplyPreset(LineShapePreset) instead.

Declaration
public bool ApplyPreset(ShapePreset preset)
Public Function ApplyPreset(preset As ShapePreset) As Boolean
Parameters
Type Name Description
ShapePreset preset

The preset to apply.

Returns
Type Description
bool

True if the preset was applied, false otherwise (if this shape is a line geometry).

ApplyPreset(LineShapePreset)

Applies a predefined outline (LineShapePreset) to this shape.

Note that LineShapePresets can only be applied to line geometries (see IsLineGeometry(GeometryType)). If GeometryType of this shape is not a line geometry, this method will do nothing and return false. For non-line geometries use ApplyPreset(ShapePreset) instead.

Declaration
public bool ApplyPreset(LineShapePreset preset)
Public Function ApplyPreset(preset As LineShapePreset) As Boolean
Parameters
Type Name Description
LineShapePreset preset

The preset to apply.

Returns
Type Description
bool

True if the preset was applied, false otherwise (if this shape is not a line geometry).