Using the Mediator pattern in MVVM / WPF

Some instructions on how to use the Mediator design pattern as a means of allowing communication between ViewModel classes in your MVVM / WPF application. In this example I use the Mediator as a means of communicating to the main window which view to display when the user clicks a button on either of the …

Continue reading ‘Using the Mediator pattern in MVVM / WPF’ »

Using the CefSharp Chromium Web Browser in WPF / XAML

Some brief instructions on getting started with using the Chromium Web Browser in WPF. Step 1: Create a new WPF project Step 2: Obtain the CefSharp packages using NuGet Link for the NuGet packages is here: https://www.nuget.org/packages/CefSharp.WPF/ Select Tool > NuGet Package manager > Package Manager Console. Use the Step 3: add the CefSharp dll …

Continue reading ‘Using the CefSharp Chromium Web Browser in WPF / XAML’ »

Using embedded MediaElement controls to play videos in WPF / MVVM

Essentially the same as these instructions, but using a purely MVVM approach and without the additional stop / start / pause etc buttons – the application just ‘sees’ the MP4 media file it needs to play and plays it upon startup. Step 1: Create a new WPF Application Step 2: Create the Main Window ViewModel …

Continue reading ‘Using embedded MediaElement controls to play videos in WPF / MVVM’ »

How to embed the IE WebBrowser control in WPF / XAML

Firstly credit, must go to Thomas Freudenberg’s splendid 2010 blog posting : Binding WebBrowser content in WPF I have merely tweaked it a little, so that instead of using this technique to set the HTML content, which I don’t need. I just want it such that I can get it to bind to the URL …

Continue reading ‘How to embed the IE WebBrowser control in WPF / XAML’ »