presence/Presence.Desktop/ViewModels/PresenceViewModel.cs
2024-12-19 10:27:17 +03:00

37 lines
914 B
C#

using ReactiveUI;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace Presence.Desktop.ViewModels;
public class PresenceViewModel : ViewModelBase, IRoutableViewModel
{
public string? UrlPathSegment { get; }
public IScreen HostScreen { get; }
public ObservableCollection<Person> People { get; }
public PresenceViewModel()
{
var people = new List<Person>
{
new Person("Neil", "Armstrong"),
new Person("Buzz", "Lightyear"),
new Person("James", "Kirk")
};
People = new ObservableCollection<Person>(people);
}
public class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
public Person(string firstName, string lastName)
{
FirstName = firstName;
LastName = lastName;
}
}
}