Hello,
I'm working with the ListView and I'm having some problems, I was wondering if I was just missing a simple Property to set or if there's some sort of problem with the control itself.
What's happening is that the ListView is adding some margins to the left and the right of the ItemTemplates (even though in the XAML designer I can see that the ListView itself covers the full width of the page), and is somehow scaling up the TextBlocks inside each template, so as a result the whole UI of the templates is messed up.
I attached a screen to show you the difference and result I'd like to get.
This is the code of the ListView:
<
telerik:RadListView
EmptyContentDisplayMode
=
"DataSourceEmpty"
ItemsSource
=
"{x:Bind ViewModel.ItemGroups, Mode=OneWay}"
Padding
=
"0"
Margin
=
"0"
HorizontalAlignment
=
"Stretch"
HorizontalContentAlignment
=
"Stretch"
IsActionOnSwipeEnabled
=
"False"
IsCheckModeActive
=
"False"
IsDoubleTapEnabled
=
"False"
IsItemReorderEnabled
=
"False"
SelectionMode
=
"None"
>
<
telerik:RadListView.LayoutDefinition
>
<
telerikListView:StackLayoutDefinition
/>
</
telerik:RadListView.LayoutDefinition
>
<
telerik:RadListView.ListHeader
>
<
Grid
Height
=
"48"
/>
</
telerik:RadListView.ListHeader
>
<
telerik:RadListView.EmptyContent
>
<
TextBlock
Text
=
"This folder is empty :'("
Margin
=
"32,32,0,0"
FontWeight
=
"SemiLight"
FontSize
=
"20"
Foreground
=
"#FFD0D0D0"
/>
</
telerik:RadListView.EmptyContent
>
<
telerik:RadListView.ItemTemplate
>
<
DataTemplate
x:DataType
=
"dataModels:ItemsGroupWithOptionalSectionModel"
>
<
templates:SectionedGroupTemplate
/>
</
DataTemplate
>
</
telerik:RadListView.ItemTemplate
>
</
telerik:RadListView
>
I already tried setting the Padding and the Margin properties to 0, or to set HorizontalAlignment="Stretch", but I didn't solve the issue.
Is there a way to prevent the ListView to behave this way and to have it render its content without any type of modifications, just like a simple StackPanel?
Thank you in advance for your help.
Best regards,
Sergio