|
|
|
@ -0,0 +1,76 @@ |
|
|
|
|
<Window x:Class="GridSharedSample.MainWindow" |
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|
|
|
|
xmlns:local="clr-namespace:GridSharedSample" |
|
|
|
|
mc:Ignorable="d" |
|
|
|
|
Title="MainWindow" Height="450" Width="800"> |
|
|
|
|
<DockPanel Margin="10" Grid.IsSharedSizeScope="True"> |
|
|
|
|
<Grid DockPanel.Dock="Top" Background="White"> |
|
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="ssgBookNumber"/> |
|
|
|
|
<ColumnDefinition Width="*"/> |
|
|
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="ssgPublisher"/> |
|
|
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="ssgPrics"/> |
|
|
|
|
<ColumnDefinition Width="Auto"/> |
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
<Grid.RowDefinitions> |
|
|
|
|
<RowDefinition Height="Auto"/> |
|
|
|
|
</Grid.RowDefinitions> |
|
|
|
|
|
|
|
|
|
<Border Grid.Column="0" Grid.Row="0" Background="LightSteelBlue" BorderBrush="DarkGray" BorderThickness="1" Padding="5"> |
|
|
|
|
<TextBlock Text="Book No." HorizontalAlignment="Center"/> |
|
|
|
|
</Border> |
|
|
|
|
<Border Grid.Column="1" Grid.Row="0" Background="LightSteelBlue" BorderBrush="DarkGray" BorderThickness="1" Padding="5"> |
|
|
|
|
<TextBlock Text="Book name" HorizontalAlignment="Center"/> |
|
|
|
|
</Border> |
|
|
|
|
<Border Grid.Column="2" Grid.Row="0" Background="LightSteelBlue" BorderBrush="DarkGray" BorderThickness="1" Padding="5"> |
|
|
|
|
<TextBlock Text="Publisher" HorizontalAlignment="Center"/> |
|
|
|
|
</Border> |
|
|
|
|
<Border Grid.Column="3" Grid.Row="0" Background="LightSteelBlue" BorderBrush="DarkGray" BorderThickness="1" Padding="5"> |
|
|
|
|
<TextBlock Text="Price" HorizontalAlignment="Center"/> |
|
|
|
|
</Border> |
|
|
|
|
|
|
|
|
|
<FrameworkElement Grid.Column="4" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/> |
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
<ScrollViewer> |
|
|
|
|
<Grid> |
|
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="ssgBookNumber"/> |
|
|
|
|
<ColumnDefinition Width="*"/> |
|
|
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="ssgPublisher"/> |
|
|
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="ssgPrics"/> |
|
|
|
|
<ColumnDefinition Width="Auto"/> |
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
<Grid.RowDefinitions> |
|
|
|
|
<RowDefinition Height="35"/> |
|
|
|
|
<RowDefinition Height="35"/> |
|
|
|
|
<RowDefinition Height="35"/> |
|
|
|
|
<RowDefinition Height="35"/> |
|
|
|
|
</Grid.RowDefinitions> |
|
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Text="1"/> |
|
|
|
|
<TextBlock Grid.Column="1" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Text="WPF"/> |
|
|
|
|
<TextBlock Grid.Column="2" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Text="MSFT"/> |
|
|
|
|
<TextBlock Grid.Column="3" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Text="150"/> |
|
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Text="2"/> |
|
|
|
|
<TextBlock Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Text="WinForm"/> |
|
|
|
|
<TextBlock Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Text="MSFT"/> |
|
|
|
|
<TextBlock Grid.Column="3" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Text="500"/> |
|
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Text="3"/> |
|
|
|
|
<TextBlock Grid.Column="1" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Text="Elder's Scroll"/> |
|
|
|
|
<TextBlock Grid.Column="2" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Text="BETHESDA"/> |
|
|
|
|
<TextBlock Grid.Column="3" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Text="999,999,999"/> |
|
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Text="4"/> |
|
|
|
|
<TextBlock Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Text="Treasure Map"/> |
|
|
|
|
<TextBlock Grid.Column="2" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Text="Unknown"/> |
|
|
|
|
<TextBlock Grid.Column="3" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Text="999,999,999,999,999,999"/> |
|
|
|
|
</Grid> |
|
|
|
|
</ScrollViewer> |
|
|
|
|
</DockPanel> |
|
|
|
|
</Window> |