Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WeatherBotv4App - UserAlignmentConverter.cs
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
You can’t perform that action at this time.