I am trying to get the WinForms equivalent ListViewwith the property Viewset to View.List. Visually, the following works fine. The file names in mine Listboxgo from top to bottom and then wrap to a new column.
Here is the main XAML I'm working with:
<ListBox Name="thelist"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding}"
ScrollViewer.VerticalScrollBarVisibility="Disabled">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True"
Orientation="Vertical" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
However, by default, the arrow key does not end. If the last item in a column is selected, pressing the down arrow does not go to the first item in the next column.
I tried to handle the event KeyDownas follows:
private void thelist_KeyDown( object sender, KeyEventArgs e ) {
if ( object.ReferenceEquals( sender, thelist ) ) {
if ( e.Key == Key.Down ) {
e.Handled = true;
thelist.Items.MoveCurrentToNext();
}
if ( e.Key == Key.Up ) {
e.Handled = true;
thelist.Items.MoveCurrentToPrevious();
}
}
}
, , . , /, /, , .
, "0001" - "0100" 10 . , "0010" "0011" , , "0020", "0010" . "0011" , , "0010" , "0021" ( "0011" "0001".
, .
( , .)