Created
February 19, 2019 10:55
-
-
Save icebeam7/3a5b302b0d7256c08c07565bb91dda59 to your computer and use it in GitHub Desktop.
WeatherBotv4App - UserAlignmentConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
using WeatherBotv4App.Helpers; | |
using Xamarin.Forms; | |
namespace WeatherBotv4App.Converters | |
{ | |
public class UserAlignmentConverter : IValueConverter | |
{ | |
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | |
{ | |
var user = value.ToString(); | |
return user == Constants.BotUser | |
? TextAlignment.End | |
: TextAlignment.Start; | |
} | |
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | |
{ | |
throw new NotImplementedException(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment