示例#1
0
        private static void SelectedDays_PropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            DayOfWeekPicker control = obj as DayOfWeekPicker;

            control.selected_date_init = true;
            string SelectedDaysStr = control.SelectedDays.ToString();

            for (int i = 0; i < SelectedDaysStr.Length; i++)
            {
                switch (SelectedDaysStr[i])
                {
                case '1':
                {
                    control.Mon.IsChecked = true;
                    break;
                }

                case '2':
                {
                    control.Tue.IsChecked = true;
                    break;
                }

                case '3':
                {
                    control.Wed.IsChecked = true;
                    break;
                }

                case '4':
                {
                    control.Thu.IsChecked = true;
                    break;
                }

                case '5':
                {
                    control.Fri.IsChecked = true;
                    break;
                }

                case '6':
                {
                    control.Sat.IsChecked = true;
                    break;
                }

                case '7':
                {
                    control.Sun.IsChecked = true;
                    break;
                }
                }
            }
            control.selected_date_init = false;
        }
示例#2
0
        private static void LabelText_PropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            DayOfWeekPicker control = obj as DayOfWeekPicker;

            control.Sign.Content = control.LabelText;
        }