SimpleShape.FillColor-Eigenschaft

Ruft ab oder legt die Farbe fest, die verwendet wird, um die Form auszufüllen.

Namespace:  Microsoft.VisualBasic.PowerPacks
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

Syntax

'Declaration
<BrowsableAttribute(True)> _
Public Property FillColor As Color
[BrowsableAttribute(true)]
public Color FillColor { get; set; }
[BrowsableAttribute(true)]
public:
property Color FillColor {
    Color get ();
    void set (Color value);
}
[<BrowsableAttribute(true)>]
member FillColor : Color with get, set
function get FillColor () : Color
function set FillColor (value : Color)

Eigenschaftswert

Typ: System.Drawing.Color
Color , das verwendet wird, um die Form auszufüllen.

Hinweise

Die FillColor-Eigenschaft hat keine Auswirkungen, wenn FillStyle zu Transparentfestgelegt ist.Wenn BackColor und FillColor festgelegt sind und FillStyle zu Solidfestgelegt ist, überschreibt FillColorBackColor.

Für alle FillStyle-Enumerationen mit Ausnahme Solid und Transparent, wird FillColor verwendet, während die Farbe für das Muster und BackColor als Hintergrundfarbe verwendet wird.

Beispiele

Im folgenden Beispiel wird gezeigt, wie die FillColor-Eigenschaft verwendet, um die Darstellung einer Form zu ändern.Dieses Beispiel setzt voraus, dass Sie ein OvalShape-Steuerelement verfügen, das in einem Formular OvalShape1.

Private Sub OvalShape1_Click() 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;
}

.NET Framework-Sicherheit

Siehe auch

Referenz

SimpleShape Klasse

Microsoft.VisualBasic.PowerPacks-Namespace

Weitere Ressourcen

Einführung in das Line-Steuerelement und das Shape-Steuerelement (Visual Studio)

Gewusst wie: Zeichnen von Linien mit dem LineShape-Steuerelement (Visual Studio)

Gewusst wie: Zeichnen von Formen mit dem OvalShape-Steuerelement und dem RectangleShape-Steuerelement (Visual Studio)