WinFormsボタン87x30サイズのテキストの前に.ico 48x48画像を追加しようとしています:
button1.BackgroundImageLayout = ImageLayout.Stretch;
button1.BackgroundImageLayout = ImageLayout.None;
button1.BackgroundImageLayout = ImageLayout.Zoom;
button1.ImageAlign = ContentAlignment.MiddleLeft;
button1.TextImageRelation = TextImageRelation.ImageBeforeText;
button1.TextAlign = ContentAlignment.MiddleRight;
結果は次のとおりです。
次のように、左側の画像を関連する距離のテキストに揃える方法を理解しようとしています。
編集:
button1.TextImageRelation = TextImageRelation.ImageBeforeText;
button1.TextAlign = ContentAlignment.MiddleLeft; /// MiddleRight; // MiddleCenter;
button1.ImageAlign = ContentAlignment.MiddleRight; /// MiddleLeft;
結果: