PanelStyle.HorizontalAlign プロパティ
アセンブリ: System.Web (system.web.dll 内)

Dim instance As PanelStyle Dim value As HorizontalAlign value = instance.HorizontalAlign instance.HorizontalAlign = value
public: virtual property HorizontalAlign HorizontalAlign { HorizontalAlign get (); void set (HorizontalAlign value); }
/** @property */ public HorizontalAlign get_HorizontalAlign () /** @property */ public void set_HorizontalAlign (HorizontalAlign value)
public function get HorizontalAlign () : HorizontalAlign public function set HorizontalAlign (value : HorizontalAlign)
HorizontalAlign 値の 1 つ。既定値は NotSet です。

HorizontalAlign プロパティは、パネル コントロールの内容の水平方向の配置を指定します。
HorizontalAlign プロパティは、HorizontalAlign 列挙値の 1 つを使用して設定します。有効値の一覧を次の表に示します。
値 | |
---|---|
NotSet | |

Panel1 と Panel2 の 2 つのパネル コントロールの HorizontalAlign プロパティに、HorizontalAlign.Center 列挙値を設定するコード例を次に示します。この例の実行に使用できる .aspx ファイルについては、PanelStyle のトピックを参照してください。
Partial Class PanelStylevb_aspx Inherits Page Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Dim panelState As StateBag = New StateBag() Dim myPanelStyle As PanelStyle = New PanelStyle(panelState) ' Set the properties of the PanelStyle class. myPanelStyle.HorizontalAlign = HorizontalAlign.Center myPanelStyle.ScrollBars = ScrollBars.Both myPanelStyle.Wrap = False myPanelStyle.Direction = ContentDirection.LeftToRight myPanelStyle.BackImageUrl = "~\images\picture.jpg" ' Use the ApplyStyle method of the Panel control to apply ' the settings from the myPanelStyle object. Panel1.ApplyStyle(myPanelStyle) Panel2.ApplyStyle(myPanelStyle) End Sub End Class
public partial class PanelStylecs_aspx : Page { void Page_Load(object sender, EventArgs e) { StateBag panelState = new StateBag(); PanelStyle myPanelStyle = new PanelStyle(panelState); // Set the properties of the PanelStyle class. myPanelStyle.HorizontalAlign = HorizontalAlign.Center; myPanelStyle.ScrollBars = ScrollBars.Both; myPanelStyle.Wrap = false; myPanelStyle.Direction = ContentDirection.LeftToRight; myPanelStyle.BackImageUrl = @"~\images\picture.jpg"; // Use the ApplyStyle method of the Panel control to apply // the settings from the myPanelStyle object. Panel1.ApplyStyle(myPanelStyle); Panel2.ApplyStyle(myPanelStyle); } }

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


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

- PanelStyle.HorizontalAlign プロパティのページへのリンク