using System; using System.Windows; using System.Windows.Data; namespace ComeCapture.Converters { public class ToolConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return parameter != null && value != null && value.ToString() == parameter.ToString() ? Visibility.Visible : Visibility.Collapsed; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return null; } } }