Simple.Wpf.FSharp.Repl

Mimics the F# Interactive console application inside a WPF user control, this allows it to be used inside a WPF application. Currently based on the open source F# 3.1 Interactive process.


Keywords
F#, FSharp, WPF, Interactive, Terminal, Console, REPL
License
Apache-2.0
Install
Install-Package Simple.Wpf.FSharp.Repl -Version 2.1.0

Documentation

Simple.Wpf.FSharp.Repl

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).