Created
August 16, 2019 21:41
-
-
Save Sa1Gur/54aa29dc2f629aafe6be02948c3360dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SVGPathConverter : IValueConverter | |
{ | |
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) => GetSVGName((int)(value ?? 0), int.Parse(parameter as string ?? "0")); | |
string GetSVGName(int status, int parameter) | |
{ | |
if (status >= parameter) | |
return "resource://In2TeamsSplitter.Resources.starFilled.svg"; | |
else | |
return "resource://In2TeamsSplitter.Resources.starEmpty.svg"; | |
} | |
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => throw new NotImplementedException(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment