Stop using false and true in UI
MODIFY
HedgeModManager/UI/Converters.cs
HedgeModManager/UI/Converters.cs
@@ -30,6 +30,21 @@ namespace HedgeModManager
}
}
+ [ValueConversion(typeof(bool), typeof(string))]
+ public class ModSupportsSaveConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ var supportsSave = (bool)value;
+ return supportsSave ? Lang.Localise("CommonUIYes") : Lang.Localise("CommonUINo");
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotSupportedException();
+ }
+ }
+
[ValueConversion(typeof(string), typeof(Visibility))]
public class EmptyStringToVisibilityConverter : IValueConverter
{

MODIFY
HedgeModManager/UI/MainWindow.xaml
HedgeModManager/UI/MainWindow.xaml
<Window.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
<local:ModUpdateStatusConverter x:Key="ModUpdateStatusConverter"/>
+ <local:ModSupportsSaveConverter x:Key="ModSupportsSaveConverter"/>
<ContextMenu x:Key="ModContextMenu">
<MenuItem Header="{DynamicResource ModsUIModDescription}" Click="UI_Description_Click" InputGestureText="(Ctrl+D)"/>
<MenuItem Header="{DynamicResource ModsUIModFavorite}" Click="UI_Favorite_Click" InputGestureText="(Alt+F)"/>
</GridViewColumn>
<GridViewColumn Header="{DynamicResource ModsUIVersion}" Width="60" DisplayMemberBinding="{Binding Version}"/>
<GridViewColumn Header="{DynamicResource ModsUIAuthor}" Width="89" DisplayMemberBinding="{Binding Author}"/>
- <GridViewColumn Header="{DynamicResource ModsUISupportSave}" Width="105" DisplayMemberBinding="{Binding SupportsSave}"/>
+ <GridViewColumn Header="{DynamicResource ModsUISupportSave}" Width="105" DisplayMemberBinding="{Binding SupportsSave, Converter={StaticResource ModSupportsSaveConverter}}"/>
<GridViewColumn Header="{DynamicResource ModsUIHasUpdate}" Width="70" DisplayMemberBinding="{Binding UpdateServer, Converter={StaticResource ModUpdateStatusConverter}}"/>
</GridView>
</ListView.View>

Stop using false and true in UI