protected override ViewModelBase GetDataContext(MessageContent messageContent) { if (!string.IsNullOrEmpty(HtmlResource)) { HtmlFileViewModel vm = new HtmlFileViewModel(HtmlResource); vm.Caption = Caption; return(vm); } else { throw new ArgumentNullException( "Must assign HtmlResource field in ShowHtmlAction tag."); } }
public HtmlFilePage(BatchFile batchFile) { InitializeComponent(); BindingContext = viewModel = new HtmlFileViewModel(batchFile); }