Hello,
some questions about this control:
1. Is really not possible to bind the readonly collection of selected dates?
2. What is the best way to define a liste of disabled days? Not only saturnday or sunday, just any days
3. How can I reset the selected dates?
In all cases I would like to do this by MVVM bindings.
Thanks
Niko
1.ActiveDate to reset the last selection: The property SelectedDates in code behind is still containing the same dates before I have set AcitveDate = null
2. DisabledDates: This is a getter only. How can I bind it to a ViewModel? The examples show either XAML code with specific values or code behind
3. The same situation on SelectedDates: its a getter only and it cannot be bound: "Error (active) MC3065 'SelectedDates' property is read-only and cannot be set from markup. Line 53 Position 526. Bauradar.Planung D:\Software Development\Bauradar\Bauradar.Planung\a Views\vVonBisPlanung.xaml "
What I want to do:
a) Reset all date selections to null
b) Provide a list of disabled dates by binding
c) Bind the selected dates directly into the viewmodel (currently only via SelectedDatesChanged in code behind possible
Thank you for your post . May I know why you think binding the readonly collection of selected dates is not possible?To define a list of disabled days you can use DisabledDaysOfWeek property enum. The DisabledDaysOfWeek is a flagged enumeration that can be used to prevent selection of one or more days of the week. The DisabledDates may be used to disable specific dates (or ranges of dates).
Please go through this help document for better understanding and code snippets:https://es.infragistics.com/help/wpf/infragisticswpf.editors~infragistics.windows.editors.xammonthcalendar~disableddaysofweek
Now about resetting the date , off the control we have property called ActiveDate you can set it like this:calendar.ActiveDate = new DateTime(2008, 10, 16);
Here is the help document for that:https://es.infragistics.com/help/wpf/infragisticswpf.editors~infragistics.windows.editors.xammonthcalendar~activedate
Here is the list of all the available property exposed by the control if you want to have a look.
Let me know if you have a question.