Hello!!! It's simple. There is a control in WPF-Calendar. You must select multiple dates from the calendar. and vice versa, mark the dates added to the list in the calendar.
Those. two-sided binding on SelectedDates. But as in many controls for collections (ListView, ListBox), there is no normal selection for multiple selection. Using the event selection element you can create a list of selected dates, but here's how to highlight dates in Calendar?
<Calendar Name="TournamentCalendar" Grid.Column="5" FirstDayOfWeek="Monday" SelectionMode="MultipleRange" SelectedDates="{Binding Path=SelectedDateTimes}"> <i:Interaction.Triggers> <i:EventTrigger EventName="SelectedDatesChanged"> <cal:ActionMessage MethodName="AssignDates"> <cal:Parameter Value="{Binding SelectedDates, ElementName=TournamentCalendar}"/> </cal:ActionMessage> </i:EventTrigger> </i:Interaction.Triggers> </Calendar> in viewmodel
public void AssignDates(SelectedDatesCollection dates) { //Добавляем дату } Maybe something else do? Tried to search for third-party controls but all paid (((, in particular WPFExtensions.