23 lines
601 B
C#
23 lines
601 B
C#
|
|
using System;
|
|||
|
|
using System.Windows.Data;
|
|||
|
|
|
|||
|
|
namespace DTS.Common.Converters
|
|||
|
|
{
|
|||
|
|
public class BooleanToBorderThicknessConverter : IValueConverter
|
|||
|
|
{
|
|||
|
|
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
|||
|
|
{
|
|||
|
|
if ((bool)value)
|
|||
|
|
{
|
|||
|
|
return 1;
|
|||
|
|
}
|
|||
|
|
return 2;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
|||
|
|
{
|
|||
|
|
return null;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|