示例#1
0
        private void UpdateFromSelectionMode(int index, ProCalendarToggleButton proCalendarToggleButton)
        {
            switch (this.SelectionMode)
            {
            case ProCalendarViewSelectionMode.None:
            {
                UpdateNoneMode(index, proCalendarToggleButton);
                break;
            }

            case ProCalendarViewSelectionMode.Single:
            {
                UpdateSingleMode(index, proCalendarToggleButton);
                break;
            }

            case ProCalendarViewSelectionMode.Multiple:
            {
                UpdateMultipleMode(index, proCalendarToggleButton);
                break;
            }

            case ProCalendarViewSelectionMode.Extended:
            {
                UpdateExtendedMode(index, proCalendarToggleButton);
                break;
            }
            }
        }
示例#2
0
 private void UpdateSingleMode(int index, ProCalendarToggleButton proCalendarToggleButton)
 {
     if (this.SelectedItem.IsSelected && this.ContentTemplateRoot.SelectedIndex == index)
     {
         proCalendarToggleButton.IsSelected = this.SelectedItem.Equals(proCalendarToggleButton.DateTime);
     }
     else
     {
         proCalendarToggleButton.IsSelected = false;
     }
 }
示例#3
0
        private void ScrollingUpdateChildren(Panel currentItemsPanelRoot, ProCalendarToggleButton proCalendarToggleButton)
        {
            if (currentItemsPanelRoot == null || proCalendarToggleButton == null)
            {
                return;
            }

            var currentProCalendarToggleButton = currentItemsPanelRoot.Children.FirstOrDefault(j =>
            {
                var toggleButton = j as ProCalendarToggleButton;
                if (toggleButton == null)
                {
                    return(false);
                }

                return(toggleButton.Equals(proCalendarToggleButton.DateTime));
            }) as ProCalendarToggleButton;

            if (currentProCalendarToggleButton == null)
            {
                return;
            }

            if (proCalendarToggleButton.IsToday)
            {
                currentProCalendarToggleButton.IsToday = true;
                proCalendarToggleButton.IsToday        = false;
            }

            if (proCalendarToggleButton.IsSelected)
            {
                currentProCalendarToggleButton.IsSelected = true;
                proCalendarToggleButton.IsSelected        = false;
            }
            else if (proCalendarToggleButton.IsDisabled)
            {
                currentProCalendarToggleButton.IsDisabled = true;
                proCalendarToggleButton.IsDisabled        = false;
            }
            else if (proCalendarToggleButton.IsBlackout)
            {
                currentProCalendarToggleButton.IsBlackout = true;
                proCalendarToggleButton.IsBlackout        = false;
            }
        }
示例#4
0
 private void UpdateExtendedMode(int index, ProCalendarToggleButton proCalendarToggleButton)
 {
     //TODO: UpdateExtendedMode();
 }
示例#5
0
 private void UpdateMultipleMode(int index, ProCalendarToggleButton proCalendarToggleButton)
 {
     //TODO: UpdateMultipleMode();
 }