private void FilterAppointments() { CalendarDay day1 = this.GetTemplateChild("day1") as CalendarDay; day1.ItemsSource = Appointments.ByDate(CurrentWeek.Day1); day1.Day = CurrentWeek.Day1; TextBlock dayHeader1 = this.GetTemplateChild("dayHeader1") as TextBlock; dayHeader1.Text = CurrentDate.ToShortDateString(); CalendarDay day2 = this.GetTemplateChild("day2") as CalendarDay; day2.ItemsSource = Appointments.ByDate(CurrentWeek.Day2); day2.Day = CurrentWeek.Day2; TextBlock dayHeader2 = this.GetTemplateChild("dayHeader2") as TextBlock; dayHeader2.Text = CurrentWeek.Day2.ToShortDateString(); CalendarDay day3 = this.GetTemplateChild("day3") as CalendarDay; day3.ItemsSource = Appointments.ByDate(CurrentWeek.Day3); day3.Day = CurrentWeek.Day3; TextBlock dayHeader3 = this.GetTemplateChild("dayHeader3") as TextBlock; dayHeader3.Text = CurrentWeek.Day3.ToShortDateString(); CalendarDay day4 = this.GetTemplateChild("day4") as CalendarDay; day4.ItemsSource = Appointments.ByDate(CurrentWeek.Day4); day4.Day = CurrentWeek.Day4; TextBlock dayHeader4 = this.GetTemplateChild("dayHeader4") as TextBlock; dayHeader4.Text = CurrentWeek.Day4.ToShortDateString(); CalendarDay day5 = this.GetTemplateChild("day5") as CalendarDay; day5.ItemsSource = Appointments.ByDate(CurrentWeek.Day5); day5.Day = CurrentWeek.Day5; TextBlock dayHeader5 = this.GetTemplateChild("dayHeader5") as TextBlock; dayHeader5.Text = CurrentWeek.Day5.ToShortDateString(); CalendarDay day6 = this.GetTemplateChild("day6") as CalendarDay; day6.ItemsSource = Appointments.ByDate(CurrentWeek.Day6); day6.Day = CurrentWeek.Day6; TextBlock dayHeader6 = this.GetTemplateChild("dayHeader6") as TextBlock; dayHeader6.Text = CurrentWeek.Day6.ToShortDateString(); CalendarDay day7 = this.GetTemplateChild("day7") as CalendarDay; day7.ItemsSource = Appointments.ByDate(CurrentWeek.Day7); day7.Day = CurrentWeek.Day7; TextBlock dayHeader7 = this.GetTemplateChild("dayHeader7") as TextBlock; dayHeader7.Text = CurrentWeek.Day7.ToShortDateString(); }
private void FilterAppointments() { DateTime byDate = CurrentDate; CalendarDay day = this.GetTemplateChild("day") as CalendarDay; // day.ItemsSource = Appointments.ByDate(byDate); TextBlock dayHeader = this.GetTemplateChild("dayHeader") as TextBlock; dayHeader.Text = byDate.DayOfWeek.ToString(); }
private void FilterAppointments() { DateTime byDate = CurrentDate; CalendarDay day = this.GetTemplateChild("day") as CalendarDay; day.ItemsSource = Appointments.ByDate(byDate); CalendarLedger test = this.GetTemplateChild("Slots") as CalendarLedger; // day.ItemsSource = Appointments; TextBlock dayHeader = this.GetTemplateChild("dayHeader") as TextBlock; dayHeader.Text = byDate.Date.ToLongDateString(); }