namespace Qwirkle.Views { public partial class ScoreboardLine : ContentView { public static readonly BindableProperty NameplayerProperty = BindableProperty.Create(nameof(Nameplayer), typeof(string), typeof(ScoreboardLine), default(string), propertyChanged: OnPlayerChanged); public string Nameplayer { get => (string)GetValue(NameplayerProperty); set => SetValue(NameplayerProperty, value); } private static void OnPlayerChanged(BindableObject bindable, object oldValue, object newValue) { var bin = (ScoreboardLine)bindable; bin.OnPropertyChanged(nameof(Nameplayer)); } public static readonly BindableProperty ScoreProperty = BindableProperty.Create(nameof(Score), typeof(int), typeof(ScoreboardLine), default(int), propertyChanged: OnScoreChanged); public int Score { get => (int)GetValue(ScoreProperty); set => SetValue(ScoreProperty, value); } private static void OnScoreChanged(BindableObject bindable, object oldValue, object newValue) { var bin = (ScoreboardLine)bindable; bin.OnPropertyChanged(nameof(Score)); } public ScoreboardLine() { InitializeComponent(); BindingContext = this; } } }