You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.4 KiB
44 lines
1.4 KiB
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|