提交 c81fff3a 编写于 作者: 闫驚鏵

Update ColorTypeToVisibilityConverter.cs

上级 de508eb9
...@@ -10,10 +10,8 @@ namespace WPFDevelopers.Converts ...@@ -10,10 +10,8 @@ namespace WPFDevelopers.Converts
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{ {
if (value is Enum enumValue && parameter is Enum targetEnumValue) if (value is Enum enumValue && parameter is Enum targetEnumValue)
{
if (enumValue.Equals(targetEnumValue)) if (enumValue.Equals(targetEnumValue))
return Visibility.Visible; return Visibility.Visible;
}
return Visibility.Collapsed; return Visibility.Collapsed;
} }
...@@ -22,4 +20,4 @@ namespace WPFDevelopers.Converts ...@@ -22,4 +20,4 @@ namespace WPFDevelopers.Converts
throw new NotImplementedException(); throw new NotImplementedException();
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册