Freigeben über


SimpleShape.FillColor-Eigenschaft

Ruft die zum Ausfüllen der Form verwendete Farbe ab, oder legt diese fest.

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: Color
Die Color , die zum Ausfüllen der Form verwendet wird.

Hinweise

Die FillColor -Eigenschaft hat keine Auswirkungen, wenn die FillStyle minFreeThreads auf Transparent. Wenn beide die BackColor und FillColor festgelegt und FillStyle minFreeThreads auf Solid, FillColor überschreibt BackColor.

Für alle FillStyle Enumerationen, mit Ausnahme von Solid und Transparent, FillColor dient als Farbe für das Muster und BackColor wird als Hintergrundfarbe verwendet.

Beispiele

Das folgende Beispiel zeigt, wie Sie die FillColor -Eigenschaft können Sie die Darstellung einer Form zu ändern. In diesem Beispiel benötigen Sie ein OvalShape -Steuerelement namens OvalShape1 in einem Formular.

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)