markus / KCOM / Converters / GridSelectMultiValueConverter.cs @ df2e7646
이력 | 보기 | 이력해설 | 다운로드 (1.24 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Globalization; |
4 |
using System.Linq; |
5 |
using System.Text; |
6 |
using System.Threading.Tasks; |
7 |
using System.Windows.Data; |
8 |
|
9 |
namespace KCOM.Converters |
10 |
{ |
11 |
public class GridSelectMultiValueConverter : IMultiValueConverter |
12 |
{ |
13 |
|
14 |
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) |
15 |
{ |
16 |
GridSelectMultiValues result = null; |
17 |
|
18 |
if (values.Count() == 2) |
19 |
{ |
20 |
if (values[0] is Telerik.Windows.Controls.RadWindow && values[1] != null) |
21 |
{ |
22 |
result = new GridSelectMultiValues |
23 |
{ |
24 |
RadWindow = values[0] as Telerik.Windows.Controls.RadWindow, |
25 |
SelectItem = values[1] |
26 |
}; |
27 |
} |
28 |
} |
29 |
|
30 |
return result; |
31 |
} |
32 |
|
33 |
|
34 |
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) |
35 |
{ |
36 |
throw new NotImplementedException(); |
37 |
} |
38 |
} |
39 |
|
40 |
public class GridSelectMultiValues |
41 |
{ |
42 |
public Telerik.Windows.Controls.RadWindow RadWindow { get; set; } |
43 |
public object SelectItem { get; set; } |
44 |
} |
45 |
} |