WIP
This commit is contained in:
parent
62ec876f78
commit
9c4621fe74
49 changed files with 742 additions and 444 deletions
|
|
@ -1,14 +1,15 @@
|
|||
using System;
|
||||
using BookAStar.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection.Emit;
|
||||
using System.Text;
|
||||
|
||||
using Xamarin.Forms;
|
||||
|
||||
|
||||
namespace BookAStar.Views
|
||||
{
|
||||
public partial class MarkdownView : ContentView
|
||||
public class MarkdownView : View
|
||||
{
|
||||
public static readonly BindableProperty MarkdownProperty = BindableProperty.Create(
|
||||
"Markdown", typeof(string), typeof(MarkdownView), null, BindingMode.TwoWay
|
||||
|
|
@ -23,25 +24,20 @@ namespace BookAStar.Views
|
|||
return markdown;
|
||||
}
|
||||
set {
|
||||
markdown = value;
|
||||
Content = App.PlateformSpecificInstance.CreateMarkdownView(
|
||||
markdown,
|
||||
e => {
|
||||
Markdown = e;
|
||||
if (Validated != null)
|
||||
Validated.Invoke(this, new EventArgs());
|
||||
if (markdown != value)
|
||||
if (Edited != null)
|
||||
{
|
||||
markdown = value;
|
||||
Edited.Invoke(this, new EventArgs());
|
||||
return;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
markdown = value;
|
||||
}
|
||||
}
|
||||
|
||||
public MarkdownView() : base()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public event EventHandler Validated;
|
||||
|
||||
|
||||
public event EventHandler<EventArgs> Edited;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue