Skip to content
David Desmaisons edited this page Sep 26, 2016 · 20 revisions

Welcome to the Neutronium wiki!

Getting started

The best way to start with Neutronium is to download template C# solution from visual studio gallery.

Template application will install nuget dependencies and scaffold a very simple solution including simple View HTML and View Model.

solution

Neutronium applications are WPF application:

  • App sets-up Chromium initialization and deals with clean-up on closing application
  • MainWindow contains an unique UserControl: Neutronium HTMLViewControl
<Grid>
    <WPF:HTMLViewControl IsDebug="True" RelativeSource="View\MainView.html" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
</Grid>

RelativeSource reference path to HTML.

Important: All files used by Neutronium such as HTML, CSS and javascript should be of type Content with Copy Always as copy to output property.

Creating a binding

The HTMLViewControl will load local "View\MainView.html" HTML file and use the corresponding DataContext as a ViewModel just as standard WPF.

To bind to the ViewModel in HTML

HTML view files will treat DataContext ViewModel as

Clone this wiki locally