wip rating

main
Paul Schneider 9 years ago
parent 732cbe5a71
commit 7b14d0f8a9
5 changed files with 35 additions and 0 deletions

@ -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

Loading…