20240301_JSEQ_upperpc/JiangsuEarthquakeNowUI/JiangsuEarthquake/Common/ConnectConvertClientImage.cs

33 lines
936 B
C#
Raw Permalink Normal View History

2024-11-01 07:54:08 +00:00
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();
}
}
}