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.
sae201_qwirkle/Qwirkle/QwirkleViews/Views/ScoreboardLine.xaml.cs

38 lines
976 B

using QwirkleClassLibrary.Games;
using QwirkleClassLibrary.Players;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Qwirkle.Views;
public partial class ScoreboardLine : ContentView
{
public ScoreboardLine()
{
InitializeComponent();
BindingContext = this;
}
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));
}
}