0
votes

When my control have size less than listbox verticalscrollviewer enables automatically.

<ListBox Name="listBox" ItemsSource="{Binding DropPlaces}"
                 ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
    <ListBox.ItemsPanel>
        <ItemsPanelTemplate>
            <WrapPanel FlowDirection="LeftToRight" Orientation="Horizontal" />
        </ItemsPanelTemplate>
    </ListBox.ItemsPanel>
    <ListBox.ItemTemplate>
        ...
    </ListBox.ItemTemplate>
</ListBox>
2
which control you are talking about? Post the control's code aswell - Sajeetharan
set ScrollViewer.HorizontalScrollBarVisibility="Hidden" - Heena Patil

2 Answers

0
votes

You can set ScrollViewer.VerticalScrollBarVisibility to Disable or Auto. It's more effective if you also set VerticalContentAlignment to Stretch.

I hope this answer will helpful for you.