34 lines
863 B
C#
34 lines
863 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
|
|
namespace GeekDesk.Util
|
|
{
|
|
class VisibilityConvert : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
int v = (int)value;
|
|
|
|
if (v == (int)Visibility.Visible)
|
|
{
|
|
return Visibility.Visible;
|
|
} else if (v == (int)Visibility.Collapsed)
|
|
{
|
|
return Visibility.Collapsed;
|
|
}
|
|
return v;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|