public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { IControl control = value as IControl; if (control != null && parameter is UnderlinedType) { UnderlinedType underlinedTypeParam = (UnderlinedType)parameter; UnderlinedType underlinedType = TabControlHelper.GetUnderlined(control); if (underlinedType == underlinedTypeParam) { return(true); } } return(false); }