public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (!(value is CategoryMatchType)) { throw new ArgumentException("Value must be of type CategoryMatchType"); } CategoryMatchType cmt = (CategoryMatchType)value; if (cmt == CategoryMatchType.Manual) { return(Visibility.Visible); } else { return(Visibility.Collapsed); } }
public Post(string s, Category m, CategoryMatchType mt) { _Text = s; _Match = m; _MatchType = mt; }