Permalink
Browse files

Fixed a bug in a converter.

  • Loading branch information...
1 parent 05db008 commit 23793f3e9a55c85562d9d9f529c8840ad5b24dc6 @kaisellgren committed Jul 3, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 Converters/GetDataGridContentHeightConverter.cs
@@ -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)

0 comments on commit 23793f3

Please sign in to comment.