개정판 f65e6c02
debug_SNI 추가
Change-Id: I46d431ca15362882a9ab7e8dd7600371f47471de
KCOM/Common/Converter/SvgImageConverter.cs | ||
---|---|---|
12 | 12 |
|
13 | 13 |
namespace KCOM.Common.Converter |
14 | 14 |
{ |
15 |
class SvgImageConverter : IMultiValueConverter
|
|
15 |
class SvgImageConverter : IValueConverter |
|
16 | 16 |
{ |
17 |
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) |
|
17 |
|
|
18 |
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
|
18 | 19 |
{ |
20 |
if(value == null) |
|
21 |
{ |
|
22 |
return null; |
|
23 |
} |
|
24 |
|
|
19 | 25 |
//var uri = string.Format("pack://application:,,,/images/{0}{1}.png", values); // for example |
20 |
var uri = values[0].ToString();
|
|
26 |
var uri = value.ToString(); |
|
21 | 27 |
|
22 | 28 |
Image img = new Image(); |
23 | 29 |
if (uri.Contains(".svg")) |
... | ... | |
41 | 47 |
//return new BitmapImage(new Uri(uri)); |
42 | 48 |
return img.Source; |
43 | 49 |
} |
44 |
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) |
|
50 |
|
|
51 |
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
|
45 | 52 |
{ |
46 | 53 |
throw new NotImplementedException(); |
47 | 54 |
} |
내보내기 Unified diff