XAML 코드
1 2 3 4 5 6 7 | <ListView Name="ImageListView" ScrollViewer.CanContentScroll="False"> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem"> <EventSetter Event="RequestBringIntoView" Handler="ListBoxItemRequestBringIntoView"/> </Style> </ListBox.ItemContainerStyle> </ListView> |
CS 코드
1 2 3 4 | private void ListBoxItemRequestBringIntoView(object sender , RequestBringIntoViewEventArgs e) { e.Handled = true; } |
'Windows Programming > WPF' 카테고리의 다른 글
ListView에서 Item 선택시 선택배경색 없애기 (0) | 2016.08.08 |
---|---|
Textbox에 Ctrl + A (전체선택) 기능 추가 (0) | 2014.05.27 |
Drag and Drop Files 구현 (0) | 2014.05.27 |