This project is read-only.

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 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"/> 

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



More Sample:






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