UITypeEditor.PaintValue 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
繪製物件值的表示。
PaintValue(PaintValueEventArgs) |
使用指定的 PaintValueEventArgs 來繪製物件值的表示。 |
PaintValue(Object, Graphics, Rectangle) |
將指定物件的表示值繪製到指定的畫布上。 |
使用指定的 PaintValueEventArgs 來繪製物件值的表示。
public:
virtual void PaintValue(System::Drawing::Design::PaintValueEventArgs ^ e);
C#
public virtual void PaintValue (System.Drawing.Design.PaintValueEventArgs e);
abstract member PaintValue : System.Drawing.Design.PaintValueEventArgs -> unit
override this.PaintValue : System.Drawing.Design.PaintValueEventArgs -> unit
Public Overridable Sub PaintValue (e As PaintValueEventArgs)
參數
PaintValueEventArgs,表示要繪製什麼與繪製位置。
備註
編輯器應該繪製在指定矩形的界限內。 這個矩形表示 屬性視窗 的區域,以繪製內值的表示法。
從 .NET Framework 4.6 開始,當 app.config 檔案包含下列專案時,所Bounds指定的矩形將會根據系統 DPI 設定來重設大小:
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
</appSettings>
另請參閱
適用於
.NET Framework 4.8.1 和其他版本
產品 | 版本 |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
將指定物件的表示值繪製到指定的畫布上。
public:
void PaintValue(System::Object ^ value, System::Drawing::Graphics ^ canvas, System::Drawing::Rectangle rectangle);
C#
public void PaintValue (object value, System.Drawing.Graphics canvas, System.Drawing.Rectangle rectangle);
C#
public void PaintValue (object? value, System.Drawing.Graphics canvas, System.Drawing.Rectangle rectangle);
member this.PaintValue : obj * System.Drawing.Graphics * System.Drawing.Rectangle -> unit
Public Sub PaintValue (value As Object, canvas As Graphics, rectangle As Rectangle)
參數
- value
- Object
這個型別編輯器會顯示其值的物件。
- canvas
- Graphics
要繪製物件值之表示的畫布。
備註
編輯器應該繪製在指定矩形的界限內。 這個矩形表示 屬性視窗 的區域,以繪製內值的表示法。
從 .NET Framework 4.6 開始,當 app.config 檔案包含下列專案時,所Bounds指定的矩形將會根據系統 DPI 設定來重設大小:
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
</appSettings>
適用於
.NET Framework 4.8.1 和其他版本
產品 | 版本 |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |