mirror of
https://github.com/ckaczor/Common.Wpf.git
synced 2026-01-13 17:22:47 -05:00
19 lines
432 B
C#
19 lines
432 B
C#
using System.Windows.Controls;
|
|
|
|
namespace Common.Wpf.Extensions
|
|
{
|
|
public static class GridExtensions
|
|
{
|
|
public static int GetRowIndex(this Grid grid, RowDefinition rowDefinition)
|
|
{
|
|
for (int i = 0; i < grid.RowDefinitions.Count; i++)
|
|
{
|
|
if (grid.RowDefinitions[i] == rowDefinition)
|
|
return i;
|
|
}
|
|
|
|
return -1;
|
|
}
|
|
}
|
|
}
|