A problem with DatePicker is that BlackoutDates collection cannot be initalized without a Calendar instance. So in MVVM environment, it is bit hard to bind BlackoutDates dynamically. But attached properties are a handy way to handle these type of situations. An attached property of type List<DateTime> can be used to achieve this. The dates will be added to the collection in the callback event of attached property manually.

    public class BlackOutDatesAdapter
{
public static List<DateTime> GetBlackOutDates(DependencyObject obj)
{
return (List<DateTime>)obj.GetValue(BlackOutDatesProperty);
}

public static void SetBlackOutDates(DependencyObject obj, List<DateTime> value)
{
obj.SetValue(BlackOutDatesProperty, value);
}

// Using a DependencyProperty as the backing store for BlackOutDates. This enables animation, styling, binding, etc...
public static readonly DependencyProperty BlackOutDatesProperty =
DependencyProperty.RegisterAttached("BlackOutDates", typeof(List<DateTime>), typeof(BlackOutDatesAdapter), new PropertyMetadata(null, OnBlackOutDatesChanged));

private static void OnBlackOutDatesChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
{
var control = sender as DatePicker;
var list = (List<DateTime>)e.NewValue;
foreach(var date in list)
{
control.BlackoutDates.Add(new CalendarDateRange(date));
}
}
}

And this can be bound in XAML as below,

        <DatePicker VerticalAlignment="Center"
Width="200"
local:BlackOutDatesAdapter.BlackOutDates="{Binding BlackOutDates}"
DisplayDate="{Binding DisplayDate}"/>

In sample application the black out dates are populated based on the display date, so that user can see different blackout dates for different months. The Display Date property is bound to XAML.

        private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "DisplayDate")
{
BlackOutDates = new List<DateTime> { DisplayDate.Date.AddDays(randm.Next(1, 5)), DisplayDate.AddDays(randm.Next(1, 5)) };
}
}

Download Sample

datepicker