SimpleShape.FillGradientStyle (Propiedad)

Actualización: noviembre 2007

Obtiene o establece el estilo de degradado que se utiliza para rellenar la forma.

Espacio de nombres:  Microsoft.VisualBasic.PowerPacks
Ensamblado:  Microsoft.VisualBasic.PowerPacks.Vs (en Microsoft.VisualBasic.PowerPacks.Vs.dll)

Sintaxis

<BrowsableAttribute(True)> _
Public Property FillGradientStyle As FillGradientStyle

Dim instance As SimpleShape
Dim value As FillGradientStyle

value = instance.FillGradientStyle

instance.FillGradientStyle = value
[BrowsableAttribute(true)]
public FillGradientStyle FillGradientStyle { get; set; }
[BrowsableAttribute(true)]
public:
property FillGradientStyle FillGradientStyle {
    FillGradientStyle get ();
    void set (FillGradientStyle value);
}
public function get FillGradientStyle () : FillGradientStyle
public function set FillGradientStyle (value : FillGradientStyle)

Valor de propiedad

Tipo: Microsoft.VisualBasic.PowerPacks.FillGradientStyle

Enumeración FillGradientStyle que determina el tipo y la dirección de un relleno de degradado mostrado en la forma.

Comentarios

Si la propiedad FillStyle está establecida en cualquier valor distinto de Solid, no se mostrará el efecto de degradado.

Cuando la propiedad FillGradientStyle está establecida en None, esta propiedad no tiene efecto.

Cuando FillGradientStyle está establecido en Central, FillGradientColor determinará el color en el centro de la forma. Este color se mezclará gradualmente en el FillColor en los bordes exteriores.

Cuando FillGradientStyle está establecido en Horizontal o ForwardDiagonal, los colores se mezclan desde el FillColor de la izquierda al FillGradientColor de la derecha.

Cuando FillGradientStyle está establecido en BackwardDiagonal, los colores se mezclan desde el FillColor de la izquierda al FillGradientColor de la derecha.

Cuando FillGradientStyle está establecido en Vertical, los colores se mezclan desde el FillColor de la parte superior al FillGradientColor de la parte inferior.

Ejemplos

En el siguiente ejemplo se muestra cómo utilizar la propiedad FillGradientStyle para cambiar la apariencia de una forma. Este ejemplo requiere que tenga un control OvalShape denominado OvalShape1 en un formulario.

Private Sub OvalShape1_Click(ByVal sender As System.Object, _
 ByVal e As System.EventArgs) Handles OvalShape1.Click
    ' Set the fill style.
    OvalShape1.FillStyle = FillStyle.Solid
    ' Set the fill color.
    OvalShape1.FillColor = Color.Red
    ' Set the gradient style.
    OvalShape1.FillGradientStyle = FillGradientStyle.Central
    ' Set the gradient color.
    OvalShape1.FillGradientColor = Color.Purple
End Sub
private void ovalShape1_Click(System.Object sender, System.EventArgs e)
{
    // Set the fill style.
    ovalShape1.FillStyle = FillStyle.Solid;
    // Set the fill color.
    ovalShape1.FillColor = Color.Red;
    // Set the gradient style.
    ovalShape1.FillGradientStyle = FillGradientStyle.Central;
    // Set the gradient color.
    ovalShape1.FillGradientColor = Color.Purple;
}

Permisos

Vea también

Referencia

SimpleShape (Clase)

SimpleShape (Miembros)

Microsoft.VisualBasic.PowerPacks (Espacio de nombres)

Otros recursos

Introducción a los controles de líneas y formas (Visual Studio)

Cómo: Dibujar líneas con el control LineShape (Visual Studio)

Cómo: Dibujar formas con los controles OvalShape y RectangleShape (Visual Studio)