2011-05-11 4 views

답변

1

, 아마, 내가이 같은 쿼리를 사용하는 것이이 작업을 수행 할 좋은 방법이없는 "세포"의 여러 요소가있을 수 있습니다 :

int x = 0; 
int y = 1; 
var target = (from UIElement c in grid.Children 
     where Grid.GetRow(c) == y && Grid.GetColumn(c) == x 
     select c).First(); 
1

건물 HB에를 문제의 "Canvas"부분에 작은 테스트를 추가합니다.

int x = 0; 
int y = 1; 
var target = (from UIElement c in grid.Children 
     where Grid.GetRow(c) == y && Grid.GetColumn(c) == x && c is Canvas 
     select c).First(); 
관련 문제