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; } } }
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; } }
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; } }
private void UpdateExtendedMode(int index, ProCalendarToggleButton proCalendarToggleButton) { //TODO: UpdateExtendedMode(); }
private void UpdateMultipleMode(int index, ProCalendarToggleButton proCalendarToggleButton) { //TODO: UpdateMultipleMode(); }