I need to fire the date selected by an user for perform a research in a database. The caller class isn't the MainWindow class but rather an external class called Fixtures, and read objects GUI call the manufacturer via a variable. For example, in this case to access the calendar execute:
MainWindow.AppWindow.Calendar;
How can I see if a date has been selected by a user?
If you want to do something when selected date changes, the Calendar control has a SelectedDatesChanged event. Add an event handler method for this event.
XAML:
<Calendar SelectedDatesChanged="Calendar_OnSelectedDatesChanged"/>
Code behind:
private void Calendar_OnSelectedDatesChanged(object sender, SelectionChangedEventArgs e)
{
}
It sounds like your question might be around object scope in C#. Needs further explanation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With