private void MainContentGrid_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
var uie = e.OriginalSource as UIElement;
//string n = ((FrameworkElement)e.OriginalSource).Name; //컨트롤 이름
if (e.Key == Key.Enter)
{
e.Handled = true;
uie.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
}
}
위와 같이 하면MainContentGrid 안에 포함된 (TextBox /ComboBox 등등) 컨트롤이 Tab 순서에 맞게 이동됩니다.
'WPF' 카테고리의 다른 글
| WPF 다국어 지원 (2) | 2011.03.02 |
|---|---|
| [ WPF / GetProperty ] AutoComplate 구현 (0) | 2011.01.13 |
| [GetKeyStates / Ctrl+S] 컨트롤+S 동시누름키값 받아오기 (0) | 2011.01.04 |
| [WPF AutoComplateBox / ToolKit] 초간단 자동완성 구현하기 (0) | 2010.12.23 |
| [WPF ToolKit] WPF 툴킷 /Extended 툴킷 다운로드 (0) | 2010.12.23 |
| [WPF Ribbon 컨트롤] Windows Xp 오류 문제 (0) | 2010.12.17 |
| [DataGridCell / Setter ] 특정 Cell 만 변경하기 (0) | 2010.11.26 |
| [WPF Blend4/MouseDrag/MouseDragElementBehavior ] 창 가운데 띄우기 / 마우스드래그 (0) | 2010.11.24 |
| WPF Dialog Box/ ValidationRule 파일열기 유효성검사 (0) | 2010.10.20 |
| [ADO.NET Entity Data Model ]실버라이트 초간단 데이터 바인딩 (0) | 2010.10.14 |