WPF DocPanel

DocPanel
索引サイト

こいつは棒グラフを作成するには、最も簡潔明瞭なパネル。ドキュメントを作ろうとすると「使えるものなら作ってみろ」と言われているように思えてきた。暑さのせいか被害妄想。いかんいかん




<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Wpf-DockPanel" Height="500" Width="750">
<Grid Background="Navy">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="9*" />
<RowDefinition Height="9*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="9*" />
<ColumnDefinition Width="9*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<DockPanel Margin="10" Grid.Column="1" Grid.Row="1">
<Button Width="20" Content="Button" Height="117" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
<Button Width="20" Content="Button" Height="080" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
<Button Width="20" Content="Button" Height="100" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
<Button Width="20" Content="Button" Height="117" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
<Button Width="20" Content="Button" Height="173" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
<Button Width="20" Content="Button" Height="127" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
<Button Width="20" Content="Button" Height="147" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
<Button Width="20" Content="Button" Height="180" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
<Button Width="20" Content="Button" Height="147" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
</DockPanel>
<DockPanel Margin="10" Grid.Column="2" Grid.Row="1">
<Button Width="20" Content="Button" Height="117" HorizontalAlignment="Left" VerticalAlignment="Center" />
<Button Width="20" Content="Button" Height="080" HorizontalAlignment="Left" VerticalAlignment="Center" />
<Button Width="20" Content="Button" Height="100" HorizontalAlignment="Left" VerticalAlignment="Center" />
<Button Width="20" Content="Button" Height="117" HorizontalAlignment="Left" VerticalAlignment="Center" />
<Button Width="20" Content="Button" Height="173" HorizontalAlignment="Left" VerticalAlignment="Center" />
<Button Width="20" Content="Button" Height="127" HorizontalAlignment="Left" VerticalAlignment="Center" />
<Button Width="20" Content="Button" Height="147" HorizontalAlignment="Left" VerticalAlignment="Center" />
<Button Width="20" Content="Button" Height="180" HorizontalAlignment="Left" VerticalAlignment="Center" />
<Button Width="20" Content="Button" Height="147" HorizontalAlignment="Left" VerticalAlignment="Center" />
</DockPanel>
<DockPanel Margin="10" Grid.Column="1" Grid.Row="2">
<Button Content="Top" DockPanel.Dock="Top" />
<Button Content="Bottom" DockPanel.Dock="Bottom" />
<Button Content="Left" DockPanel.Dock="Left" Width="68" />
<Button Content="Right" DockPanel.Dock="Right" Width="142" />
<Button Content="Center"/>
</DockPanel>
<DockPanel Margin="10" Grid.Column="2" Grid.Row="2" Background="White">
<StackPanel DockPanel.Dock="Top" Height="30" Background="White" Orientation="Horizontal">
<TextBox Name="textBox1" Width="219" HorizontalAlignment="Right" Text="DocPanel" />
<TextBox Name="textBox2" Width="85" HorizontalAlignment="Right" Text="2011-07-14" />
</StackPanel>
<StackPanel DockPanel.Dock="Bottom" Height="30">
<TextBox Name="textBox3" Text="********************************" />
</StackPanel>
<TextBox DockPanel.Dock="Left" Width="20" />
<DockPanel Background="White" Name="dockPanel2" Width="280" HorizontalAlignment="Left" VerticalAlignment="Top">
<Image DockPanel.Dock="Left" Height="120" Name="image1" Stretch="Fill" Width="150" Source="h:/png/xx1111-2.png" />
<TextBlock DockPanel.Dock="Left" Height="126" Name="textBlock1" Text="TextBlock" Width="120" Background="Azure" HorizontalAlignment="Right" />
</DockPanel>
</DockPanel>
</Grid>
</Window>



AX