Skip to content

Commit

Permalink
Housekeeping: Add documentation explaining how to use ReactiveUserCon…
Browse files Browse the repository at this point in the history
…trol in XAML (#1855)
  • Loading branch information
jorisvergeer authored and glennawatson committed Dec 11, 2018
1 parent 5130ff9 commit 3a05159
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/ReactiveUI/Platforms/windows-common/ReactiveUserControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,33 @@ namespace ReactiveUI
/// ]]>
/// </code>
/// </para>
/// <para>
/// Note that UWP projects do not support the <c>TypeArguments</c> attribute. The XAML designer window in WPF projects also does not
/// support generic types. To use <see cref="ReactiveUserControl{TViewModel}"/> in XAML documents you need to create a base class
/// where you derive from <see cref="ReactiveUserControl{TViewModel}"/> with the type argument filled in.
/// <code>
/// <![CDATA[
/// internal class YourViewBase : ReactiveUserControl<YourViewModel> { /* No code needed here */ }
///
/// public partial class YourView : YourViewBase
/// {
/// /* Your code */
/// }
/// ]]>
/// </code>
/// Then you can use this base class as root in your XAML document.
/// <code>
/// <![CDATA[
/// <views:YourViewBase
/// x:Class="views:YourView"
/// xmlns:rxui="http://reactiveui.net"
/// xmlns:views="clr-namespace:Foo.Bar.Views"
/// xmlns:vms="clr-namespace:Foo.Bar.ViewModels">
/// <!-- view XAML here -->
/// </views:YourViewBase>
/// ]]>
/// </code>
/// </para>
/// </remarks>
/// <typeparam name="TViewModel">
/// The type of the view model backing the view.
Expand Down

0 comments on commit 3a05159

Please sign in to comment.