Esempio n. 1
0
 object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (value is MapItem)
     {
         ShapeTitle title = value as ShapeTitle;
         return(HotelRoomTooltipHelper.GetItemImageSource(title != null ? title.MapShape : (MapItem)value));
     }
     return(null);
 }
Esempio n. 2
0
 object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (value is MapItem && targetType == typeof(Visibility))
     {
         ShapeTitle title       = value as ShapeTitle;
         string     imageSource = HotelRoomTooltipHelper.GetItemImageSource(title != null ? title.MapShape : (MapItem)value);
         return(string.IsNullOrWhiteSpace(imageSource) ? Visibility.Collapsed : Visibility.Visible);
     }
     return(null);
 }