public static int GetIdFromUGrid(UniformGrid uniformGrid) { TextBlock tb = (TextBlock)uniformGrid.FindName("IdTBlock"); return(Int32.Parse(tb.Text)); }