<Description("Sets the height of one row.")> _
Public Sub SetRowHeight(ByVal Row As Integer, ByVal height As Integer)
Try
Dim d As New DataGrid()
Dim p As PropertyInfo = d.GetType.GetProperty("DataGridRows", BindingFlags.FlattenHierarchy Or BindingFlags.IgnoreCase Or BindingFlags.Instance Or BindingFlags.NonPublic Or BindingFlags.Public Or BindingFlags.Instance Or BindingFlags.Static)
Dim r As Object() = p.GetValue(Me, BindingFlags.Instance Or BindingFlags.Static Or BindingFlags.GetProperty Or BindingFlags.Public Or BindingFlags.SuppressChangeType, Nothing, Nothing, Nothing)
If Row < r.Length Then
r(Row).Height = height
Me.Invalidate()
Else
Throw New Exception("Row index outside of boundaries.")
End If
Catch
Throw New Exception("Error while reflecting. Framework version might be wrong.")
End Try
End Sub
Public Sub SetRowHeight(ByVal Row As Integer, ByVal height As Integer)
Try
Dim d As New DataGrid()
Dim p As PropertyInfo = d.GetType.GetProperty("DataGridRows", BindingFlags.FlattenHierarchy Or BindingFlags.IgnoreCase Or BindingFlags.Instance Or BindingFlags.NonPublic Or BindingFlags.Public Or BindingFlags.Instance Or BindingFlags.Static)
Dim r As Object() = p.GetValue(Me, BindingFlags.Instance Or BindingFlags.Static Or BindingFlags.GetProperty Or BindingFlags.Public Or BindingFlags.SuppressChangeType, Nothing, Nothing, Nothing)
If Row < r.Length Then
r(Row).Height = height
Me.Invalidate()
Else
Throw New Exception("Row index outside of boundaries.")
End If
Catch
Throw New Exception("Error while reflecting. Framework version might be wrong.")
End Try
End Sub