Getting Elmish in .NET with Elmish.WPF

Matt Eland
The Startup
Published in
10 min readDec 30, 2019

--

Let’s talk about Elmish.WPF and how it brings Model View Update (MVU) architecture and Functional Programming to desktop .NET development.

In this article I’ll share the results of my early journey in learning Elmish.WPF and walk you through setting up a new project. Don’t know what Elmish.WPF is? That’s fine — I barely knew myself. I’ll teach you everything you need to know.

My main goal for you in reading this is that you:

  • Learn what Elmish.WPF is
  • Understand how to get started with Elmish.WPF
  • Think about the advantages F# and Model View Update (MVU) application architectures bring to the table

Along the way, we’ll cover:

  • What is Elm anyway?
  • What Elmish.WPF is and how it helps with XAML applications
  • The differences between MVVM and MVU application architectures
  • Installing and referencing Elmish.WPF
  • Hosting WPF content from an F# library
  • Creating a XAML control library to represent static views

If you’re a .NET developer I encourage you to give this a read, even if you aren’t extremely interested in desktop or mobile development. Elmish style architectures are spreading and understanding Model View Update at a high level will help you down the road.

--

--

Matt Eland
The Startup

Microsoft MVP in AI, AI Specialist at Leading EDJE. Author of "Refactoring with C#".