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

26 lines
818 B
C#
Raw Normal View History

2023-04-13 11:51:03 +08:00
using System;
using System.Globalization;
using System.Windows.Data;
using ExtendedGrid.Microsoft.Windows.Controls;
2023-04-13 11:51:03 +08:00
namespace MECF.Framework.UI.Client.RecipeEditorLib.Converters
2023-04-13 11:51:03 +08:00
{
public class IsCellAccessPermEditModeToDgSelectionMode : IValueConverter
2023-04-13 11:51:03 +08:00
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is bool isCellAccessPermEditMode)
2023-04-13 11:51:03 +08:00
{
return isCellAccessPermEditMode ? DataGridSelectionMode.Single : DataGridSelectionMode.Extended;
2023-04-13 11:51:03 +08:00
}
return DataGridSelectionMode.Extended;
2023-04-13 11:51:03 +08:00
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}