I have this code in a xaml page:
<ListBox Height="524" HorizontalAlignment="Left" Margin="12,6,0,0" Name="listBox1" VerticalAlignment="Top" Width="438" BorderThickness="1" BorderBrush="White" >
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}" Margin="5" TextAlignment="Left" HorizontalAlignment="Left" />
<TextBlock Text="{Binding DeadLine}" Margin="5" TextAlignment="Right" HorizontalAlignment="Right" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
As you can see, I am dividing my listbox in 2 textboxes and trying to put one text in the left most position and the other one in the right most position in the line. But I can’t, this doesn’t work.
Am I missing something? How cn I put the deadline aligned right?
Thanks,
Oscar
Just got a solution mixing many solutions I found (including given in this forum)
tks!