Compartir a través de


SimpleShape.FillColor (Propiedad)

Actualización: noviembre 2007

Obtiene o establece el color 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 FillColor As Color

Dim instance As SimpleShape
Dim value As Color

value = instance.FillColor

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

Valor de propiedad

Tipo: System.Drawing.Color

Color que se utiliza para rellenar la forma.

Comentarios

La propiedad FillColor no tiene ningún efecto cuando FillStyle está establecido en Transparent. Si se establecen BackColor y FillColor, y FillStyle está establecido en Solid, FillColor invalida BackColor.

Para todas las enumeraciones FillStyle, salvo Solid y Transparent, se utiliza FillColor como color para el modelo y BackColor como color de fondo.

Ejemplos

En el siguiente ejemplo se muestra cómo utilizar la propiedad FillColor 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)