2012年2月24日金曜日

StackPanel コントロール

コントロールを積み重ねて配置する。

<Window x:Class="WpfApplication.Window"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Window" Height="300" Width="300">
    <StackPanel Orientation="Horizontal">
        <StackPanel Width="138">
            <Label>あいうえお</Label>
            <Label>かきくけこ</Label>
            <Label>さしすせそ</Label>
            <Label>たちつてと</Label>
        </StackPanel>
        <StackPanel Width="138">
            <Button>なにぬねの</Button>
            <Button>はひふへほ</Button>
            <Button>まみむめも</Button>
            <Button>や ゆ よ</Button>
        </StackPanel>
    </StackPanel>
</Window>
Orientationでコントロールの方向を指定することが出来る。

0 件のコメント:

コメントを投稿