I would like to use a list box to have a label with 3 parts. The first part is hard-coded text, the second part is a value from a bound property in the view model, and the last part is a hard-coded text too.
The idea is something like that:
<ListBox x:Name="list1" ItemsSource="{Binding IvasConImportes}"
BorderBrush="Transparent"
BorderThickness="0"
Background="Transparent">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Name="lblIvaParte01" Content="TAX " HorizontalAlignment="Left" HorizontalContentAlignment="Right" Width="6.4cm" Margin="0,0,0,0" Padding="0,0,0,0" VerticalAlignment="Top"/>
<Label Name="lblIvaParte02" Content="{Binding Item1}" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Width="6.4cm" Margin="0,0,0,0" Padding="0,0,0,0" VerticalAlignment="Top"/>
<Label Name="lblIvaParte03" Content="%" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Width="6.4cm" Margin="0,0,0,0" Padding="0,0,0,0" VerticalAlignment="Top"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
The problem is that in this way to align the text is a bit hard and also I guess that it has to be possible to do all this with only one label, but I don't know the syntax in the binding of the content of the label to do that.