SimpleShape.FillStyle 屬性
取得或設定用於填滿圖形的圖樣。
命名空間: Microsoft.VisualBasic.PowerPacks
組件: Microsoft.VisualBasic.PowerPacks.Vs (在 Microsoft.VisualBasic.PowerPacks.Vs.dll 中)
語法
'宣告
<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)
屬性值
類型:Microsoft.VisualBasic.PowerPacks.FillStyle
AFillStyle決定要顯示在 [圖形模式的列舉型別。
備註
FillStyle屬性可以用來在圖形上顯示純色或兩種色彩模式。
當FillStyle屬性設定為Solid、FillColor用來填滿形狀。 所有其他模式,FillColor用的模式比對和BackColor用於背景。
當FillStyle以外屬性設定為任何值Solid、FillGradientColor和FillGradientStyle屬性沒有任何作用。
範例
下列範例示範如何使用FillStyle屬性來變更圖形的外觀。 此範例中您需要OvalShape名 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 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。
請參閱
參考
Microsoft.VisualBasic.PowerPacks 命名空間
其他資源
Line 和 Shape 控制項簡介 (Visual Studio)