Skip to content

Commit 7b90808

Browse files
committed
Use Converter to transform format to actual display
1 parent 28a2664 commit 7b90808

File tree

4 files changed

+920
-888
lines changed

4 files changed

+920
-888
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System;
2+
using System.Globalization;
3+
using System.Windows.Data;
4+
5+
namespace Flow.Launcher.Converters
6+
{
7+
public class DateTimeFormatToNowConverter : IValueConverter
8+
{
9+
10+
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
11+
{
12+
return value is not string format ? null : DateTime.Now.ToString(format);
13+
}
14+
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
15+
{
16+
throw new NotImplementedException();
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)