Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed a bug in a converter.
  • Loading branch information
kaisellgren committed Jul 3, 2012
1 parent 05db008 commit 23793f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Converters/GetDataGridContentHeightConverter.cs
Expand Up @@ -14,8 +14,9 @@ class GetDataGridContentHeightConverter : IValueConverter
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var dataGrid = (DataGrid) value;
var height = dataGrid.ActualHeight - 24;

return dataGrid.ActualHeight - 24;
return height >= 0 ? height : 0;
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Expand Down

0 comments on commit 23793f3

Please sign in to comment.