-1
我想從對象發件人中獲取選定日期並將該日期傳遞給其他方法。所以,如何從發件人對象獲取日期。從發件人獲取選定日期
我的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();
}
}
什麼什麼是在這種情況下,發送者?你還沒有給我們足夠的信息繼續下去。 –