Share via


VisualStyleRenderer.GetMargins(IDeviceContext, MarginProperty) メソッド

定義

現在の visual スタイル要素の、指定したマージン プロパティの値を返します。

public:
 System::Windows::Forms::Padding GetMargins(System::Drawing::IDeviceContext ^ dc, System::Windows::Forms::VisualStyles::MarginProperty prop);
public System.Windows.Forms.Padding GetMargins (System.Drawing.IDeviceContext dc, System.Windows.Forms.VisualStyles.MarginProperty prop);
member this.GetMargins : System.Drawing.IDeviceContext * System.Windows.Forms.VisualStyles.MarginProperty -> System.Windows.Forms.Padding
Public Function GetMargins (dc As IDeviceContext, prop As MarginProperty) As Padding

パラメーター

dc
IDeviceContext

この操作で使用される IDeviceContext

prop
MarginProperty

現在の visual スタイル要素の取得対象プロパティ値を指定する MarginProperty 値の 1 つ。

戻り値

Padding

現在の visual スタイル要素の、prop パラメーターで指定したプロパティの値を格納している Padding

例外

dcnullです。

propMarginProperty 値のいずれでもありません。

注釈

ビジュアル スタイルでは、一連の余白値を使用して、スタイルによって定義された要素の一部のプロパティを記述します。 これらのプロパティは、値によって MarginProperty カプセル化されます。

適用対象