mirror of
https://github.com/ckaczor/Common.Wpf.git
synced 2026-01-21 01:25:36 -05:00
Initial commit
This commit is contained in:
18
Extensions/GridExtensions.cs
Normal file
18
Extensions/GridExtensions.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user