public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
var isMultipleOptionsTemplateViewModel = (bool?)values[1];
if (isMultipleOptionsTemplateViewModel.GetValueOrDefault(false))
return BitmapFrame.Create (new Uri ("pack://application:,,,/CalDavSynchronizer;component/Resources/AddMultiple.png"));
var itemType = (OlItemType?) values[0];
switch (itemType)
{
case OlItemType.olAppointmentItem:
return BitmapFrame.Create (new Uri ("pack://application:,,,/CalDavSynchronizer;component/Resources/Appointment.png"));
case OlItemType.olTaskItem:
return BitmapFrame.Create (new Uri ("pack://application:,,,/CalDavSynchronizer;component/Resources/Task.png"));
case OlItemType.olContactItem:
return BitmapFrame.Create (new Uri ("pack://application:,,,/CalDavSynchronizer;component/Resources/Contact.png"));
}
return Binding.DoNothing;
}