Getting md
This commit is contained in:
parent
b78d3f64c1
commit
f35dfbca25
1 changed files with 19 additions and 4 deletions
|
|
@ -10,6 +10,10 @@ namespace BookAStar.Views
|
||||||
{
|
{
|
||||||
public partial class MarkdownView : ContentView
|
public partial class MarkdownView : ContentView
|
||||||
{
|
{
|
||||||
|
public static readonly BindableProperty MarkdownProperty = BindableProperty.Create(
|
||||||
|
"Markdown", typeof(string), typeof(MarkdownView), null, BindingMode.TwoWay
|
||||||
|
);
|
||||||
|
|
||||||
private string markdown;
|
private string markdown;
|
||||||
|
|
||||||
public string Markdown
|
public string Markdown
|
||||||
|
|
@ -18,15 +22,26 @@ namespace BookAStar.Views
|
||||||
{
|
{
|
||||||
return markdown;
|
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()
|
public MarkdownView() : base()
|
||||||
{
|
{
|
||||||
markdown = "**Hello** _world_";
|
|
||||||
Content = App.PlateformSpecificInstance.CreateMarkdownView(markdown);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public event EventHandler Validated;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue