<UserControl x:Class="HandyControlDemo.UserControl.StepBarDemoCtl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
             xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
             DataContext="{Binding StepBarDemo,Source={StaticResource Locator}}"
             FocusManager.FocusedElement="{Binding RelativeSource={x:Static RelativeSource.Self}, Mode=OneTime}"
             Background="{DynamicResource RegionBrush}">
    <Grid Margin="32" Name="PanelMain">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <controls:StepBar Grid.ColumnSpan="2">
            <controls:StepBarItem Content="{x:Static langs:Lang.Register}"/>
            <controls:StepBarItem Content="{x:Static langs:Lang.BasicInfo}"/>
            <controls:StepBarItem Content="{x:Static langs:Lang.UploadFile}"/>
            <controls:StepBarItem Content="{x:Static langs:Lang.Complete}"/>
        </controls:StepBar>
        <StackPanel Margin="0,32" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Center">
            <Button Command="{Binding PrevCmd}" CommandParameter="{Binding ElementName=PanelMain}" Width="180" Content="{x:Static langs:Lang.Prev}" Style="{StaticResource ButtonPrimary}"/>
            <Button Command="{Binding NextCmd}" CommandParameter="{Binding ElementName=PanelMain}" Width="180" Margin="0,16,0,0" Content="{x:Static langs:Lang.Next}" Style="{StaticResource ButtonPrimary}"/>
        </StackPanel>
        <controls:StepBar Margin="0,0,0,32" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Dock="Bottom">
            <controls:StepBarItem Content="{x:Static langs:Lang.Register}"/>
            <controls:StepBarItem Content="{x:Static langs:Lang.BasicInfo}"/>
            <controls:StepBarItem Content="{x:Static langs:Lang.UploadFile}"/>
            <controls:StepBarItem Content="{x:Static langs:Lang.Complete}"/>
        </controls:StepBar>
        <controls:StepBar Grid.Column="0" Grid.Row="3" ItemsSource="{Binding DataList}" Dock="Left">
            <controls:StepBar.ItemTemplate>
                <DataTemplate>
                    <StackPanel>
                        <TextBlock Text="{Binding Header}" FontSize="16" FontWeight="Bold" HorizontalAlignment="Left"/>
                        <TextBlock Margin="0,4,0,0" Text="{Binding Content}"/>
                    </StackPanel>
                </DataTemplate>
            </controls:StepBar.ItemTemplate>
        </controls:StepBar>
        <controls:StepBar Grid.Column="1" Grid.Row="3" ItemsSource="{Binding DataList}" Dock="Right">
            <controls:StepBar.ItemTemplate>
                <DataTemplate>
                    <StackPanel>
                        <TextBlock Text="{Binding Header}" FontSize="16" FontWeight="Bold" HorizontalAlignment="Left"/>
                        <TextBlock Margin="0,4,0,0" Text="{Binding Content}"/>
                    </StackPanel>
                </DataTemplate>
            </controls:StepBar.ItemTemplate>
        </controls:StepBar>
    </Grid>
</UserControl>
