Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. wpf xbap listbox problem

wpf xbap listbox problem

Scheduled Pinned Locked Moved WPF
wpfhelpcsharpcssdotnet
3 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pat3d2
    wrote on last edited by
    #1

    Hi, I have created a listbox with items in XAML file using VS2008. (for a WPF Browser application) I'm selecting a item with the mouse, and when I'm using the up and down keys of the keyboard and reach the top or the bottom of the listbox, it goes out the listbox. Is there a way not to leave the listbox ? I hope I'm clear enough in my explanation. If anyone can help. Thanks in advance, Pat3d My code: <Page xmlns:my="clr-namespace:System.Windows.Shapes;assembly=PresentationFramework" x:Class="WpfBrowserStyleTest.Page1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dropShadow="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" Title="Page1" Width="562" ShowsNavigationUI="False"> <Grid Height="263" Width="488"> <Grid.RowDefinitions> <RowDefinition Height="176.346*" /> <RowDefinition Height="86.654*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="325.422*" /> <ColumnDefinition Width="162.578*" /> </Grid.ColumnDefinitions> <dropShadow:SystemDropShadowChrome Color="#71000000" Margin="0,0,0,79.083" HorizontalAlignment="Left" Width="159.984"> <ListBox SelectionMode="Multiple" IsTabStop="False"> <ListBoxItem>test</ListBoxItem> <ListBoxItem>test2</ListBoxItem> <ListBoxItem>test3</ListBoxItem> <ListBoxItem>test4</ListBoxItem> <ListBoxItem>test</ListBoxItem> <ListBoxItem>test2</ListBoxItem> <ListBoxItem>test3</ListBoxItem> <ListBoxItem>test4</ListBoxItem> </ListBox> </dropShadow:SystemDropShadowChrome> <Button Grid.Column="1" Height="23" Margin="40.905,50.245,46.359,0" Name="button1" VerticalAlignment="Top">Button</Button> </Grid> </Page>

    R 1 Reply Last reply
    0
    • P pat3d2

      Hi, I have created a listbox with items in XAML file using VS2008. (for a WPF Browser application) I'm selecting a item with the mouse, and when I'm using the up and down keys of the keyboard and reach the top or the bottom of the listbox, it goes out the listbox. Is there a way not to leave the listbox ? I hope I'm clear enough in my explanation. If anyone can help. Thanks in advance, Pat3d My code: <Page xmlns:my="clr-namespace:System.Windows.Shapes;assembly=PresentationFramework" x:Class="WpfBrowserStyleTest.Page1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dropShadow="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" Title="Page1" Width="562" ShowsNavigationUI="False"> <Grid Height="263" Width="488"> <Grid.RowDefinitions> <RowDefinition Height="176.346*" /> <RowDefinition Height="86.654*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="325.422*" /> <ColumnDefinition Width="162.578*" /> </Grid.ColumnDefinitions> <dropShadow:SystemDropShadowChrome Color="#71000000" Margin="0,0,0,79.083" HorizontalAlignment="Left" Width="159.984"> <ListBox SelectionMode="Multiple" IsTabStop="False"> <ListBoxItem>test</ListBoxItem> <ListBoxItem>test2</ListBoxItem> <ListBoxItem>test3</ListBoxItem> <ListBoxItem>test4</ListBoxItem> <ListBoxItem>test</ListBoxItem> <ListBoxItem>test2</ListBoxItem> <ListBoxItem>test3</ListBoxItem> <ListBoxItem>test4</ListBoxItem> </ListBox> </dropShadow:SystemDropShadowChrome> <Button Grid.Column="1" Height="23" Margin="40.905,50.245,46.359,0" Name="button1" VerticalAlignment="Top">Button</Button> </Grid> </Page>

      R Offline
      R Offline
      RNEELY
      wrote on last edited by
      #2

      Try <ListBox SelectionMode="Multiple" KeyboardNavigation.DirectionalNavigation="Cycle">

      Sincerely, -Ron

      P 1 Reply Last reply
      0
      • R RNEELY

        Try <ListBox SelectionMode="Multiple" KeyboardNavigation.DirectionalNavigation="Cycle">

        Sincerely, -Ron

        P Offline
        P Offline
        pat3d2
        wrote on last edited by
        #3

        Thanks Ron, It's working fine with KeyboardNavigation.DirectionalNavigation="Cycle" Pat

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups