Skip to content

Instantly share code, notes, and snippets.

@worldbeater
Last active December 23, 2018 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save worldbeater/dff37763d6da9c985bcec45617fbff12 to your computer and use it in GitHub Desktop.
Save worldbeater/dff37763d6da9c985bcec45617fbff12 to your computer and use it in GitHub Desktop.
public sealed partial class FeedbackView : Page, IViewFor<FeedbackViewModel>
{
public static readonly DependencyProperty ViewModelProperty = DependencyProperty
.Register(nameof(ViewModel), typeof(FeedbackViewModel), typeof(FeedbackView), null);
public FeedbackView()
{
InitializeComponent();
ViewModel = new FeedbackViewModel(new UwpSender(), new Clock());
this.WhenActivated(disposables => { /* handle interactions, etc. */ });
}
public FeedbackViewModel ViewModel
{
get => (FeedbackViewModel)GetValue(ViewModelProperty);
set => SetValue(ViewModelProperty, value);
}
object IViewFor.ViewModel
{
get => ViewModel;
set => ViewModel = (FeedbackViewModel)value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment