Listbox has no scrollbar

Please report bugs here. If you are unsure whether something is a bug or an expected behavior, please post it on the "Technical Support" forum instead, and wait for a moderator to handle/move the post.
hamej
Posts: 37
Joined: Thu Oct 01, 2015 8:41 am

Listbox has no scrollbar

Postby hamej » Mon Oct 05, 2015 3:42 am

I have a listbox as Shown below. Problem is that there is no Scrollbar shown even if the Listbox.Width is too small to show all pictures in the list, and ListBox has no properties for scrollbars.

<ListBox Grid.Column="0" HorizontalAlignment="Left" Margin="10,10,0,0" Name="PictureListBox" VerticalAlignment="Top"
SelectionChanged="PictureListBox_SelectionChanged"
SelectionMode="Single" Height="160" >
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>

<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical">
<Image Source="{Binding Path=PictureImageSource, Mode=OneWay}" Height="130"
Stretch="Fill" HorizontalAlignment="Left" VerticalAlignment="Top">
</Image>
<TextBlock Text="{Binding Path=ShortText, Mode=OneWay}" TextWrapping="Wrap" HorizontalAlignment="Center" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: Listbox has no scrollbar

Postby JS-Support @Userware » Fri Oct 23, 2015 11:33 am

Hello hamej,

Thanks for your message.

Yes, in the Beta 5, the ListBox has no built-in scrollbars. You can workaround the issue by placing your ListBox inside a ScrollViewer, as shown below:

Code: Select all

<ScrollViewer Width="80" Height="120">
    <ListBox>
        <ListBoxItem>One</ListBoxItem>
        <ListBoxItem>Two</ListBoxItem>
        <ListBoxItem>Three</ListBoxItem>
        <ListBoxItem>Four</ListBoxItem>
        <ListBoxItem>Five</ListBoxItem>
        <ListBoxItem>Six</ListBoxItem>
        <ListBoxItem>Seven</ListBoxItem>
        <ListBoxItem>Eight</ListBoxItem>
        <ListBoxItem>Nine</ListBoxItem>
    </ListBox>
</ScrollViewer>


Regards,
JS-Support

hamej
Posts: 37
Joined: Thu Oct 01, 2015 8:41 am

Re: Listbox has no scrollbar

Postby hamej » Sun Mar 06, 2016 4:36 am

This is not a solution! When do you support ListBox with built-in scrollbar?

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: Listbox has no scrollbar

Postby JS-Support @Userware » Sun Mar 06, 2016 4:39 am

Thanks hamej. We are still working on it. We hope to have it implemented in v1.0.

For the moment you need to use the ScrollViewer workaround described above. Thanks for your patience.

Regards,
JS-Support


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 31 guests