Я нашел «решение» своей проблемы:
CalendarioView.Xaml:
<Button x:Name="finde_btn" Text="Finde" BackgroundColor="White" BorderWidth="3" BorderColor="#2DABE2" CornerRadius="10" Grid.Row="2" Clicked="Button_Clicked_Finde"
FontSize="13" />
<calendar:Calendar
x:Name="calendar"
MultiSelectDates="True"
SelectedBorderWidth="0"
BorderColor="Transparent"
StartDay="Monday"
EnableTitleMonthYearView="True"
SelectRange="False"
SelectedDates="{Binding Dates, Mode=TwoWay}"
MinDate="{Binding Date}"
TitleLabelFormat="MMM yyyy"
HorizontalOptions="Center">
CalendarioView.xaml.cs
public partial class CalendarioView : MvxContentPage<CalendarioViewModel>
{
public CalendarioView ()
{
InitializeComponent ();
}
public void Button_Clicked_Finde(object sender, System.EventArgs e)
{
ViewModel.Finde(calendar.StartDate);
calendar.RaiseSpecialDatesChanged();
}
........
CalendandarioViewModel.cs
public class CalendarioViewModel : MvxViewModel, INotifyPropertyChanged
{
public CalendarioViewModel()
{
_dates = new ObservableCollection<DateTime>();
}
public DateTime Date
{
get => DateTime.Now;
}
private ObservableCollection<DateTime> _dates;
public ObservableCollection<DateTime> Dates
{
get { return _dates; }
set {
SetProperty(ref _dates, value);
}
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName)
{
var propertyChangedCallback = PropertyChanged;
propertyChangedCallback?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public void Finde(DateTime startDate)
{
List<DateTime> fechas = GetWeekend(startDate);
foreach (DateTime dateTime in fechas)
{
Dates.Add(dateTime);
}
OnPropertyChanged("Dates");
}
........
В резюме:
Нажатие кнопки-> Вызов Button_Clicked_Finde в Calendario.xalm.cs-> Вызов функции Finde в ViewModel-> По окончании выполнения calendar.RaiseSpecialDatesChanged () и обновление календаря пользовательского интерфейса
С уважением