Migrate to Stylet and refactor view/view-model framework

This commit is contained in:
Alexey Golub
2018-11-29 19:18:44 +02:00
parent 083bdef419
commit 0d3510222e
49 changed files with 672 additions and 921 deletions

View File

@@ -8,10 +8,12 @@ namespace DiscordChatExporter.Gui.Converters
[ValueConversion(typeof(ExportFormat), typeof(string))]
public class ExportFormatToStringConverter : IValueConverter
{
public static ExportFormatToStringConverter Instance { get; } = new ExportFormatToStringConverter();
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var format = (ExportFormat) value;
return format.GetDisplayName();
var format = (ExportFormat?) value;
return format?.GetDisplayName();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)