WPF Recursion Controls

Project Description
WPF Recursion Controls presents a simple language for drawing pictures that illustrates
the power of data abstraction and closure, and also exploits higher-order procedures
in an essential way. The language is designed to make it easy to experiment with
patterns such as the on

http://e4d.co.il/piclang/ See demo in Silverlight

Beside Sample:

The XAML code:
<E4D:Beside Width="512" Height="256" Content="Beside">
                 <!-- Can be any UIElement-->
    		<Image Source="..\Images\E4D.png" Stretch="Fill"/> 
</E4D:Beside>



The Function code:
public static UIElement Below( this UIElement source )
{
            UIElement cloned = source.Clone();
            return Below( source, cloned );
}
public static UIElement Below( this UIElement source, UIElement element )
{
            Grid g = new Grid();
            RowDefinition r1 = new RowDefinition ();
            r1.Height = new GridLength ( 0.5 , GridUnitType.Star );
            RowDefinition r2 = new RowDefinition();
            r2.Height = new GridLength ( 0.5 , GridUnitType.Star );
            g.RowDefinitions.Add( r1 );
            g.RowDefinitions.Add( r2 );
            g.ShowGridLines = ShowGridLines;
            g.Children.Add( source );
            g.Children.Add( element );
            Grid.SetRow( source, 0 );
            Grid.SetRow( element, 1 );

            return g;
}

The Result in Blend

Belnd_Beside.png

Belnd_Spine_Beside.png

More Sample:

image.png.png

image_1.png.png

image_thumb_14.png

p1_3.png.png

p2.png.png

Last edited Jun 13, 2011 at 9:09 PM by Vardi, version 5