|
0
|
1 |
using System; |
|
|
2 |
using System.Net; |
|
|
3 |
using System.Windows; |
|
|
4 |
using System.Windows.Controls; |
|
|
5 |
using System.Windows.Documents; |
|
|
6 |
using System.Windows.Ink; |
|
|
7 |
using System.Windows.Input; |
|
|
8 |
using System.Windows.Media; |
|
|
9 |
using System.Windows.Media.Animation; |
|
|
10 |
using System.Windows.Shapes; |
|
|
11 |
using System.Windows.Data; |
|
|
12 |
namespace Iri.Modernisation.Controls.Converter |
|
|
13 |
{ |
|
|
14 |
public class BoolToVisibility : IValueConverter |
|
|
15 |
{ |
|
|
16 |
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
|
|
17 |
{ |
|
|
18 |
if ((bool)value) |
|
|
19 |
{ |
|
|
20 |
return Visibility.Visible; |
|
|
21 |
} |
|
|
22 |
else |
|
|
23 |
{ |
|
|
24 |
return Visibility.Collapsed; |
|
|
25 |
} |
|
|
26 |
|
|
|
27 |
} |
|
|
28 |
|
|
|
29 |
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
|
|
30 |
{ |
|
|
31 |
|
|
|
32 |
throw new NotImplementedException(); |
|
|
33 |
|
|
|
34 |
} |
|
|
35 |
} |
|
|
36 |
} |