Share via


SimpleShape.FillStyle-Eigenschaft

Ruft das Symbol ab bzw. legt das Schema fest, der 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 FillStyle As FillStyle
[BrowsableAttribute(true)]
public FillStyle FillStyle { get; set; }
[BrowsableAttribute(true)]
public:
property FillStyle FillStyle {
    FillStyle get ();
    void set (FillStyle value);
}
[<BrowsableAttribute(true)>]
member FillStyle : FillStyle with get, set
function get FillStyle () : FillStyle
function set FillStyle (value : FillStyle)

Eigenschaftswert

Typ: Microsoft.VisualBasic.PowerPacks.FillStyle
Eine Enumeration, die die bestimmt FillStyle im Formular anzuzeigende Muster.

Hinweise

Die FillStyle-Eigenschaft kann verwendet werden, um eine Volltonfarbe oder ein Muster mit zwei Farben auf einem Formular anzuzeigen.

Wenn die FillStyle-Eigenschaft auf Solidfestgelegt ist, wird FillColor , mit dem die Form auszufüllen.Für alle anderen Muster wird FillColor für das Muster verwendet und BackColor wird für den Hintergrund verwendet wird.

Wenn die FillStyle-Eigenschaft auf einen beliebigen Wert außer Solidfestgelegt ist, verfügt die FillGradientColor und FillGradientStyle-Eigenschaft keine Auswirkungen.

Beispiele

Im folgenden Beispiel wird gezeigt, wie die FillStyle-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)