fixes decimal

This commit is contained in:
Paul Schneider 2016-10-09 15:11:21 +02:00
commit f69dbf732e

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -29,9 +30,8 @@ namespace BookAStar.Behaviors
private void bindable_TextChanged(object sender, TextChangedEventArgs e)
{
decimal result;
IsValid = decimal.TryParse(e.NewTextValue, out result);
IsValid = decimal.TryParse(e.NewTextValue, NumberStyles.Currency,CultureInfo.InvariantCulture, out result);
((Entry)sender).TextColor = IsValid ? Color.Default : Color.Red;
}
protected override void OnDetachingFrom(Entry bindable)