Click here to Skip to main content
13,042,421 members (138,291 online)
Click here to Skip to main content


14 bookmarked
Posted 7 Dec 2008

KenKen Solver in WPF

, 7 Dec 2008
My first WPF application to demonstrate solving KenKen puzzles.
<Window x:Class="KenKen.Window1"
    Title="KenKenSolver" Height="600" Width="579">
        <Menu Height="22" Name="menu2" VerticalAlignment="Top">
            <MenuItem Header="Test" Click="Test_Click" VerticalAlignment="Top" />
            <MenuItem Header="Clear" Click="Clear_Click" VerticalAlignment="Top" />
        <StackPanel Orientation="Horizontal">
            <Grid ShowGridLines="False" HorizontalAlignment="Left" VerticalAlignment="Top" Name="BoardGrid">
                    <RowDefinition Name="r1" />
                    <RowDefinition Name="r2" />
                    <RowDefinition Name="r3" />
                    <RowDefinition Name="r4" />
                    <RowDefinition Name="r5" />
                    <RowDefinition Name="r6" />
                    <ColumnDefinition Name="c1" Width="30" />
                    <ColumnDefinition Name="c2" Width="30" />
                    <ColumnDefinition Name="c3" Width="30" />
                    <ColumnDefinition Name="c4" Width="30" />
                    <ColumnDefinition Name="c5" Width="30" />
                    <ColumnDefinition Name="c6" Width="30" />
            <my:DataGrid Grid.Column="1" Name="RulesGrid" xmlns:my="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit" CanUserDeleteRows="True" CanUserResizeRows="False" 
                         Margin="40,0,0,0" HorizontalAlignment="Right" CanUserAddRows="True">
        <Button Height="23" Name="calculate" VerticalAlignment="Center" HorizontalAlignment="Stretch" Click="calculate_Click" Margin="20">Calculate</Button>
        <Label Grid.Row="1" HorizontalAlignment="Left" Name="label1" Width="120">Solution:</Label>
        <Label Grid.Row="2" Name="output" >...</Label>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

United Kingdom United Kingdom
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170713.1 | Last Updated 7 Dec 2008
Article Copyright 2008 by tspitz
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid