LongListSelector with delimiter between lines

I have this LongListSelector:

<Controls:LongListSelector x:Name="searchList" Margin="0,0,0,0"  Background="White" SelectionChanged="DidPressSelectSearchList" HorizontalContentAlignment="Stretch" Grid.Row="1" KeyDown="UserPressEnterKeyBoard">
                <Controls:LongListSelector.ItemTemplate>
                    <DataTemplate>
                        <local:SearchTemplateSelector Content="{Binding}" HorizontalContentAlignment="Stretch">
                            <local:SearchTemplateSelector.GoogleSuggestTemplate>
                                <DataTemplate>
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="*" />
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <Rectangle Height="1" HorizontalAlignment="Stretch" VerticalAlignment="Top" Fill="Black" Opacity="0.3"/>
                                        <TextBlock Text="{Binding}" FontSize="25" Foreground="Black" TextWrapping="Wrap" Grid.Row="1" Margin="0,10"/>
                                    </Grid>
                                </DataTemplate>
                            </local:SearchTemplateSelector.GoogleSuggestTemplate>

                            <local:SearchTemplateSelector.VideoTemplate>
                                <DataTemplate>
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="*" />
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <Rectangle Height="1" HorizontalAlignment="Stretch" VerticalAlignment="Top" Fill="Black" Opacity="0.3"/>
                                        <TextBlock Text="{Binding}" FontSize="25" Foreground="Black" TextWrapping="Wrap" Grid.Row="1" Margin="0,10"/>
                                    </Grid>
                                </DataTemplate>
                                </local:SearchTemplateSelector.VideoTemplate>
                    </local:SearchTemplateSelector>
                    </DataTemplate>
</Controls:LongListSelector.ItemTemplate>

      

So, when I select GoogleSuggestTemplate, I get this (And as you can see, the delimiter to the end of the line): enter image description here

and when I use the VideoTemplate (as you can see, the separator is cut to the end): enter image description here

any idea why this is happening?

+3


source to share





All Articles