Tuesday, January 3

LUDO Board in WPF (XAML) Code




<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="500" Width="500">



    <Grid>
        <Grid.RowDefinitions >
            <RowDefinition Height="200*"/>
            <RowDefinition Height="15*" />
            <RowDefinition Height="15*" />
            <RowDefinition Height="15*" />
            <RowDefinition Height="200*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200*" />
            <ColumnDefinition Width="15*"/>
            <ColumnDefinition Width="15*"/>
            <ColumnDefinition Width="15*"/>
            <ColumnDefinition Width="200*"/>
        </Grid.ColumnDefinitions>
        <UniformGrid Grid.Row="0" Grid.Column="0">
            <Rectangle Fill="Red" Stroke="Black"/>
        </UniformGrid>
        <UniformGrid Grid.Row="0" Grid.Column="4">
            <Rectangle Fill="Blue" Stroke="Black"/>
        </UniformGrid>
        <UniformGrid Grid.Row="4" Grid.Column="0">
            <Rectangle Fill="Green" Stroke="Black"/>
        </UniformGrid>
        <UniformGrid Grid.Row="4" Grid.Column="4">
            <Rectangle Fill="Yellow" Stroke="Black"/>
        </UniformGrid>
        <StackPanel Grid.Row="0" Grid.Column="1">
            <Rectangle Fill="White" Stroke="Black" MinHeight="36"/>
            <Rectangle Fill="White" Stroke="Black" MinHeight="36" />
            <Rectangle Fill="Blue" Stroke="Black" MinHeight="36"/>
            <Rectangle Fill="White" Stroke="Black" MinHeight="36" />
            <Rectangle Fill="White" Stroke="Black" MinHeight="36"/>
            <Rectangle Fill="White" Stroke="Black" MinHeight="36" />
        </StackPanel>
        <StackPanel Grid.Row="0" Grid.Column="2">
            <Rectangle Fill="White" Stroke="Black" Height="Auto" MinHeight="36"/>
            <Rectangle Fill="Blue" Stroke="Black" Height="Auto" MinHeight="36" />
            <Rectangle Fill="Blue" Stroke="Black" Height="Auto" MinHeight="36"/>
            <Rectangle Fill="Blue" Stroke="Black" Height="Auto" MinHeight="36" />
            <Rectangle Fill="Blue" Stroke="Black" Height="Auto" MinHeight="36"/>
            <Rectangle Fill="Blue" Stroke="Black" Height="Auto" MinHeight="36" />
        </StackPanel>
        <StackPanel Grid.Row="0" Grid.Column="3">
            <Rectangle Fill="White" Stroke="Black" MinHeight="36"/>
            <Rectangle Fill="Blue" Stroke="Black" MinHeight="36" />
            <Rectangle Fill="White" Stroke="Black" MinHeight="36"/>
            <Rectangle Fill="White" Stroke="Black" MinHeight="36" />
            <Rectangle Fill="White" Stroke="Black" MinHeight="36"/>
            <Rectangle Fill="White" Stroke="Black" MinHeight="36" />


        </StackPanel>
        <StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal">
            <Rectangle Fill="White" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="Red" Stroke="Black" MinWidth="36" />
            <Rectangle Fill="White" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="White" Stroke="Black" MinWidth="36" />
            <Rectangle Fill="White" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="White" Stroke="Black" MinWidth="36" />
        </StackPanel>
        <StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal">
            <Rectangle Fill="White" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="Red" Stroke="Black" MinWidth="36" />
            <Rectangle Fill="Red" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="Red" Stroke="Black" MinWidth="36" />
            <Rectangle Fill="Red" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="Red" Stroke="Black" MinWidth="36" />
        </StackPanel>
        <StackPanel Grid.Row="3" Grid.Column="0" Orientation="Horizontal">
            <Rectangle Fill="White" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="White" Stroke="Black" MinWidth="36" />
            <Rectangle Fill="Red" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="White" Stroke="Black" MinWidth="36" />
            <Rectangle Fill="White" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="White" Stroke="Black" MinWidth="36" />
        </StackPanel>
        <StackPanel Grid.Row="1" Grid.Column="4" Orientation="Horizontal">
            <Rectangle Fill="White" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="White" Stroke="Black" MinWidth="36" />
            <Rectangle Fill="Yellow" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="White" Stroke="Black" MinWidth="36" />
            <Rectangle Fill="White" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="White" Stroke="Black" MinWidth="36" />
        </StackPanel>
        <StackPanel Grid.Row="2" Grid.Column="4" Orientation="Horizontal">
            <Rectangle Fill="Yellow" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="Yellow" Stroke="Black" MinWidth="36" />
            <Rectangle Fill="Yellow" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="Yellow" Stroke="Black" MinWidth="36" />
            <Rectangle Fill="Yellow" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="White" Stroke="Black" MinWidth="36" />
        </StackPanel>
        <StackPanel Grid.Row="3" Grid.Column="4" Orientation="Horizontal">
            <Rectangle Fill="White" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="White" Stroke="Black" MinWidth="36" />
            <Rectangle Fill="White" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="White" Stroke="Black" MinWidth="36" />
            <Rectangle Fill="Yellow" Stroke="Black" MinWidth="36"/>
            <Rectangle Fill="White" Stroke="Black" MinWidth="36" />
        </StackPanel>
        <StackPanel Grid.Row="4" Grid.Column="1">
            <Rectangle Fill="White" Stroke="Black" Height="Auto" MinHeight="36"/>
            <Rectangle Fill="White" Stroke="Black" Height="Auto" MinHeight="36" />
            <Rectangle Fill="White" Stroke="Black" Height="Auto" MinHeight="36"/>
            <Rectangle Fill="White" Stroke="Black" Height="Auto" MinHeight="36" />
            <Rectangle Fill="Green" Stroke="Black" Height="Auto" MinHeight="36"/>
            <Rectangle Fill="White" Stroke="Black" Height="Auto" MinHeight="36" />
        </StackPanel>
        <StackPanel Grid.Row="4" Grid.Column="2">
            <Rectangle Fill="Green" Stroke="Black" Height="Auto" MinHeight="36"/>
            <Rectangle Fill="Green" Stroke="Black" Height="Auto" MinHeight="36" />
            <Rectangle Fill="Green" Stroke="Black" Height="Auto" MinHeight="36"/>
            <Rectangle Fill="Green" Stroke="Black" Height="Auto" MinHeight="36" />
            <Rectangle Fill="Green" Stroke="Black" Height="Auto" MinHeight="36"/>
            <Rectangle Fill="White" Stroke="Black" Height="Auto" MinHeight="36" />
        </StackPanel>
        <StackPanel Grid.Row="4" Grid.Column="3">
            <Rectangle Fill="White" Stroke="Black" Height="Auto" MinHeight="36"/>
            <Rectangle Fill="White" Stroke="Black" Height="Auto" MinHeight="36" />
            <Rectangle Fill="White" Stroke="Black" Height="Auto" MinHeight="36"/>
            <Rectangle Fill="Green" Stroke="Black" Height="Auto" MinHeight="36" />
            <Rectangle Fill="White" Stroke="Black" Height="Auto" MinHeight="36"/>
            <Rectangle Fill="White" Stroke="Black" Height="Auto" MinHeight="36" />
        </StackPanel>
    </Grid>
</Window>



No comments:

Post a Comment