Getting md

vnext
Paul Schneider 8 years ago
parent 4a168d1699
commit 573bd04531
1 changed files with 19 additions and 4 deletions

@ -10,6 +10,10 @@ namespace BookAStar.Views
{
public partial class MarkdownView : ContentView
{
public static readonly BindableProperty MarkdownProperty = BindableProperty.Create(
"Markdown", typeof(string), typeof(MarkdownView), null, BindingMode.TwoWay
);
private string markdown;
public string Markdown
@ -18,15 +22,26 @@ namespace BookAStar.Views
{
return markdown;
}
set { markdown = value; }
set {
markdown = value;
Content = App.PlateformSpecificInstance.CreateMarkdownView(
markdown,
e => {
Markdown = e;
if (Validated != null)
Validated.Invoke(this, new EventArgs());
}
);
}
}
public MarkdownView() : base()
{
markdown = "**Hello** _world_";
Content = App.PlateformSpecificInstance.CreateMarkdownView(markdown);
}
public event EventHandler Validated;
}
}

Loading…