Skip to content

oriches/Simple.Wpf.FSharp.Repl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple.Wpf.FSharp.Repl

Build status

A simple F# REPL engine for use in a WPF application. Mimics the F# Interactive console application inside a WPF user control. Currently based on the open source F# 3.1 Interactive process.

Currently we support the following .Net versions:

Supported versions:

.NET framework 4.8 and higher,

This library is available as a nuget [package] (https://www.nuget.org/packages/Simple.Wpf.FSharp.Repl/).

For more information about the releases see [Release Info] (https://github.com/oriches/Simple.Wpf.FSharp.Repl/wiki/Release-Info).

Example usages of the control, with styles applied dynamically, these were taken from the Wpf.TestHarness project:

alt text

Code behind implementation

public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
    }
}

XAML:

<v:ReplWindow x:Name="ReplWindow" />

MVVM implementation

public sealed class MainViewModel
{
    private readonly IReplEngineController _controller;

    public MainViewModel()
    {
        _controller = new ReplEngineController("let ollie = 1337;;");
    }

    public IReplEngineViewModel Content { get { return _controller.ViewModel; } }
}

XAML:

<v:ReplEngine x:Name="ReplEngine"
              Grid.Row="1"
              DataContext="{Binding Path=Content, Mode=OneWay}"/>

Blog post about developing this control

There is a set of blog posts which detail the journey of creating this control & nuget package - part 1, part 2, part 3 & [part 4] (http://awkwardcoder.blogspot.co.uk/2014/01/simple-f-repl-in-wpf-part-4.html).

About

A simple F# REPL engine for use in an WPF application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages