SimpleShape.FillStyle-Eigenschaft

Aktualisiert: November 2007

Ruft das Muster ab, mit dem die Form gefüllt wird, oder legt dieses fest.

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

Syntax

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

Dim instance As SimpleShape
Dim value As FillStyle

value = instance.FillStyle

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

Eigenschaftenwert

Typ: Microsoft.VisualBasic.PowerPacks.FillStyle

Eine FillStyle-Enumeration, die das Muster bestimmt, das in der Form angezeigt wird.

Hinweise

Mit der FillStyle-Eigenschaft können Sie eine durchgehende Farbe oder ein zweifarbiges Muster in einer Form anzeigen.

Wenn die FillStyle-Eigenschaft auf Solid festgelegt ist, wird FillColor zum Füllen der Form verwendet. Bei allen anderen Mustern wird FillColor für das Muster und BackColor für den Hintergrund verwendet.

Wenn die FillStyle-Eigenschaft auf einen anderen Wert als Solid festgelegt ist, haben die Eigenschaften FillGradientColor und FillGradientStyle keine Auswirkungen.

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie Sie mit der FillStyle-Eigenschaft die Darstellung einer Form ändern. Für dieses Beispiel müssen Sie über ein OvalShape-Steuerelement mit dem Namen OvalShape1 auf einem Formular verfügen.

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;
}

Berechtigungen

Siehe auch

Referenz

SimpleShape-Klasse

SimpleShape-Member

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)