Wip theme+estimate

This commit is contained in:
Paul Schneider 2016-09-25 00:44:30 +02:00
commit 6c409d6d71
12 changed files with 253 additions and 125 deletions

View file

@ -16,7 +16,10 @@ namespace BookAStar.Pages
public Estimate Estimate { get { return BindingContext as Estimate; } set {
BindingContext = value;
} }
public static readonly BindableProperty MarkdownProperty =
public static readonly BindableProperty TotalProperty =
BindableProperty.Create("Total", typeof(decimal), typeof(EditEstimatePage),
(decimal) 0, BindingMode.OneWay);
public static readonly BindableProperty DescriptionProperty =
BindableProperty.Create("Description", typeof(string), typeof(Estimate),
null, BindingMode.TwoWay);
public static readonly BindableProperty ClientProperty =
@ -26,19 +29,31 @@ namespace BookAStar.Pages
BindableProperty.Create("Query", typeof(BookQueryData), typeof(Estimate),
null, BindingMode.OneWay);
public EditEstimatePage()
{
InitializeComponent();
}
protected override void OnBindingContextChanged()
{
base.OnBindingContextChanged();
mdview.Markdown = Estimate?.Description;
// FIXME Why the Binding don't work?
mdview.Markdown = Estimate.Description;
}
protected void OnDescriptionChanged (object sender, EventArgs e)
{
// FIXME Why the Binding don't work?
Estimate.Description = mdview.Markdown;
}
protected void OnNewCommanLine(object sender, EventArgs e)
{
var com = new CommandLine();
App.CurrentApp.EditCommandLine(com);
}
}
}