Sic.Framework/MECF.Framework.UI.Client/RecipeEditorLib/Converters/IsCellAccessPermEditModeToB...

25 lines
709 B
C#

using System;
using System.Globalization;
using System.Windows.Data;
namespace MECF.Framework.UI.Client.RecipeEditorLib.Converters
{
public class IsCellAccessPermEditModeToButtonContent : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is bool isCellAccessPermEditMode)
{
return isCellAccessPermEditMode ? "Exit" : "Cell-Perm";
}
return "Cell-Perm";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}