Reputation: 12579
I am trying to add a seperator line between my items but the line doesn't show up. Can you help me out?
<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<StackPanel>
<Grid
Height="50"
VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0"
x:Name="departureTime"
FontWeight="Bold"
FontSize="15"
Margin="30,0,0,10"
Foreground="#0145A6"
Text="{Binding departureTime}"
Height="30"
HorizontalAlignment="Left"
Width="auto"/>
<TextBlock Grid.Column="1"
FontWeight="Bold"
Foreground="#0145A6"
FontSize="15"
x:Name="stopName"
Text="{Binding wheelChairId}"
FontFamily="/Fonts/icomoon.ttf#icomoon"
HorizontalAlignment="Right"
Width="auto"
Height="31"
Margin="0,0,30,0"/>
</Grid>
<Line Fill="Black" Height="1"/>
</StackPanel>
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
Upvotes: 0
Views: 78
Reputation: 2621
You can use Stretch to make your Line occupy the full width of the container. You can also use left / right margins to add a little space at each side:
XAML:
<Line X1="0" X2="1" Stroke="Brown" StrokeThickness="10" Height="auto" Width="auto" Stretch="Fill"/>
Upvotes: 1