2016-01-13 08:53:46 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Globalization;
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
|
2017-04-10 08:15:55 +08:00
|
|
|
|
namespace CefSharp.MinimalExample.Wpf.Converter
|
2016-01-13 08:53:46 +08:00
|
|
|
|
{
|
|
|
|
|
public class TitleConverter : IValueConverter
|
|
|
|
|
{
|
2021-09-21 07:27:03 +08:00
|
|
|
|
#if DEBUG
|
|
|
|
|
private const string Build = "Debug";
|
|
|
|
|
#else
|
|
|
|
|
private const string Build = "Release";
|
|
|
|
|
#endif
|
2018-02-02 14:53:45 +08:00
|
|
|
|
object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
2016-01-13 08:53:46 +08:00
|
|
|
|
{
|
2021-09-21 07:27:03 +08:00
|
|
|
|
return "CefSharp.MinimalExample.Wpf (" + Build + ") - " + (value ?? "No Title Specified");
|
2016-01-13 08:53:46 +08:00
|
|
|
|
}
|
|
|
|
|
|
2018-02-02 14:53:45 +08:00
|
|
|
|
object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
2016-01-13 08:53:46 +08:00
|
|
|
|
{
|
2017-12-09 22:11:03 +08:00
|
|
|
|
return Binding.DoNothing;
|
2016-01-13 08:53:46 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|