mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
21 lines
715 B
C#
21 lines
715 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
|
|
namespace ServerManagerTool.Common.Converters
|
|
{
|
|
public class InvertIntToVisibilityConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
double scaledValue = System.Convert.ToInt32(value);
|
|
return scaledValue == 0 ? Visibility.Visible : Visibility.Collapsed;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotSupportedException("InvertIntToVisibilityConverter is a OneWay converter.");
|
|
}
|
|
}
|
|
}
|