The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

Design Time

ReactiveUI Bindings

ReactiveUI offers a better design-time data system for solutions that use ReactiveUI type-safe bindings. this.Bind methods family overwrite whatever has been put into XAML. If your XAML markup looks like this:

    Text="This is design time text" />

You'll see This is design time text string in design time, that will be overridden by the code where binding magic happens at run time:

this.WhenActivated(disposable => 
    // ReactiveUI will bind ExampleString ViewModel property 
    // to ExampleTextBlock.Text property (defined above)
        viewModel => viewModel.ExampleString, 
        view => view.ExampleTextBlock.Text)

Regular Bindings

If you use regular bindings, or type-safe {x:Bind } markup extension available on UWP, then you can import the d directive and set design-time DataContext. For the ease of use, you can extract an interface from your ViewModel and create two implementations for it, one implementation would display design-time data only, and another one would be your actual view model. See an example.


<Page x:Class="MyCoolApp.UWP.Views.AboutView"
      d:DataContext="{d:DesignInstance designTime:DesignTimeAboutViewModel,
  <!-- Page Content -->


public interface IAboutViewModel : INotifyPropertyChanged
    IEnumerable<AboutSection> AboutSections { get; set; }

    ReactiveCommand<AboutFeed> RefreshCommand { get; set; }


public class DesignTimeAboutViewModel : IAboutViewModel
  public DesignTimeAboutViewModel()
      AboutSections = new List<AboutSectionViewModel>
          new AboutSection {Title = "Title 1", Body = "Lorum Ipsum"},
          new AboutSection {Title = "Title 2", Body = "Lorum Ipsum"},
          new AboutSection {Title = "Title 3", Body = "Lorum Ipsum"}
      RefreshCommand = ReactiveCommand.CreateFromTask(o => Task.FromResult(new AboutFeed()));
  /* Properties and commands are deliberately omitted */


public class AboutViewModel : ReactiveObject, IAboutViewModel
  /* Actual interface implementation */