wip rating

This commit is contained in:
Paul Schneider 2016-10-07 14:33:52 +02:00
commit eb629d9f3e
5 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace BookAStar.Converters
{
class RatingText : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
var rating = (int)value;
if (rating == 1)
return "Disappointed!";
if (rating == 2)
return "Not a fan!";
if (rating == 3)
return "It's Ok!";
if (rating == 4)
return "Like it!";
if (rating == 5)
return "Love it!";
return string.Empty;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB