我想从对象发送者那里获取选定的日期并将该日期传递给其他方法。那么,如何从发件人对象中获取日期。
我的 C# 代码;
public partial class MonthView : MetroWindow
{
AppController a=new AppController();
public MonthView()
{
InitializeComponent();
calMain.DisplayDate = DateTime.Today;
}
public void calItemSelectedDate(object sender, SelectionChangedEventArgs e)
{
//sender = calMain.SelectedDate;
//DateTime d = (DateTime)sender;
//a.fetchAndPopulateForDate(d); <------I want code here.
//DayView Activity = new DayView();
//Activity.Show();
//this.Close();
}
}