ButtonBase.ImageAlign プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As ButtonBase Dim value As ContentAlignment value = instance.ImageAlign instance.ImageAlign = value
[LocalizableAttribute(true)] public: property ContentAlignment ImageAlign { ContentAlignment get (); void set (ContentAlignment value); }
/** @property */ public ContentAlignment get_ImageAlign () /** @property */ public void set_ImageAlign (ContentAlignment value)
public function get ImageAlign () : ContentAlignment public function set ImageAlign (value : ContentAlignment)
ContentAlignment 値の 1 つ。既定値は MiddleCenter です。


派生クラス Button を使用して、その共通プロパティの一部を設定するコード例を次に示します。結果として、テキストを左側、イメージを右側に含むフラットなボタンが表示されます。このコードでは、C:\Graphics ディレクトリに MyBitMap.bmp という名前のビットマップ イメージが格納されており、System.Drawing 名前空間への参照がコードに含まれている必要があります。
Private Sub SetMyButtonProperties() ' Assign an image to the button. button1.Image = Image.FromFile("C:\Graphics\MyBitmap.bmp") ' Align the image and text on the button. button1.ImageAlign = ContentAlignment.MiddleRight button1.TextAlign = ContentAlignment.MiddleLeft ' Give the button a flat appearance. button1.FlatStyle = FlatStyle.Flat End Sub 'SetMyButtonProperties
private void SetMyButtonProperties() { // Assign an image to the button. button1.Image = Image.FromFile("C:\\Graphics\\MyBitmap.bmp"); // Align the image and text on the button. button1.ImageAlign = ContentAlignment.MiddleRight; button1.TextAlign = ContentAlignment.MiddleLeft; // Give the button a flat appearance. button1.FlatStyle = FlatStyle.Flat; }
private: void SetMyButtonProperties() { // Assign an image to the button. button1->Image = Image::FromFile( "C:\\Graphics\\MyBitmap.bmp" ); // Align the image and text on the button. button1->ImageAlign = ContentAlignment::MiddleRight; button1->TextAlign = ContentAlignment::MiddleLeft; // Give the button a flat appearance. button1->FlatStyle = FlatStyle::Flat; }
private void SetMyButtonProperties() { // Assign an image to the button. button1.set_Image(Image.FromFile("C:\\Graphics\\MyBitmap.bmp")); // Align the image and text on the button. button1.set_ImageAlign(ContentAlignment.MiddleRight); button1.set_TextAlign(ContentAlignment.MiddleLeft); // Give the button a flat appearance. button1.set_FlatStyle(FlatStyle.Flat); } //SetMyButtonProperties
private function SetMyButtonProperties() { // Assign an image to the button. button1.Image = Image.FromFile("C:\\Graphics\\MyBitmap.bmp"); // Align the image and text on the button. button1.ImageAlign = ContentAlignment.MiddleRight; button1.TextAlign = ContentAlignment.MiddleLeft; // Give the button a flat appearance. button1.FlatStyle = FlatStyle.Flat; }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からButtonBase.ImageAlign プロパティを検索する場合は、下記のリンクをクリックしてください。

- ButtonBase.ImageAlign プロパティのページへのリンク