20240301_JSEQ_upperpc/JiangsuEarthquakeNowUI/JiangsuEarthquake/Common/ConnectConvertClientImage.cs
2024-11-01 15:54:08 +08:00

33 lines
936 B
C#

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Windows;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;
namespace JiangsuEarthquake.Common
{
public class ConnectConvertClientImage : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value.ToString() == "True")
{
return (ImageSource)System.Windows.Application.Current.FindResource("Link");
}
else
{
return (ImageSource)System.Windows.Application.Current.FindResource("Unlink");
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}