I have a ListView
control inside UserControl
. But when content overflows size of the ListView
, vertical ScrollBar
is not enabled, despite of setting it in XAML.
XAML appears as follows:
<UserControl x:Class="GrandSuccessProject.View.ContactsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="367" d:DesignWidth="548" Background="{x:Null}" VerticalContentAlignment="Top">
<ListView ScrollViewer.CanContentScroll="True"
ScrollViewer.VerticalScrollBarVisibility="Visible"
ItemsSource="{Binding SelectedContacts}"
ItemContainerStyle="{StaticResource ContainerStyle}"
Grid.Row="1"
VerticalAlignment="Top"
VerticalContentAlignment="Top" />
</UserControl>
I also tried grouping the ListView
inside a ScrollViewer
, but still doesn't work.
Thank you very much in advance :)