public PersonViewModel(Person personToView) { FullName = string.Format("{0} {1}", personToView.FirstName, personToView.LastName); }
public MainWindow() { InitializeComponent(); var p = new Person { FirstName = "John", LastName = "Doe" }; this.DataContext = new PersonViewModel(p); }