You can't use label.Content there because it doesn't exist!
label
isn't a part of the Person class, so you can't access it. (It isn't obviously part of any class in your program, as you don't show it being declared anywhere - but I'm guessing you added it to your MainWindow class.)
Think about it: your Window shows Controls - like your Label - and may contain several instances of a Person: "James Newmann", "Lorenzo Cielo Maglaya Jr.", "Original Griff" none of which are aware of the existence of your Window. But...you may have a second Window which you want to use to display all the detail for a particular person once you have selected them on your MainWindow. And if they don't know which Window they are supposed to show on, how could they "decide" which Label to display on?
What you actually want to do is return a string from your Person class which indicates if that individual is asleep:
public bool IsAsleep { get; set; }
public string Sleeping()
{
if (IsAsleep)
{
return FirstName + " is sleeping!";
}
return FirstName + " is awake.");
}
If your main window you can then use it:
private void button_Click(object sender, RoutedEventArgs e)
{
Person employee = new Person();
employee.LastName = "Newmann";
employee.FirstName = "James";
employee.IsAsleep = true;
label.Content = employee.Sleeping();
}
BTW: in future, tag your questions a bit more carefully - this is WPF specific and should have a WPF tag.