0
votes

I am using a ListPicker to let the user choose from a list of numbers, so I bind the ItemsSource property to my List<int> property in my ViewModel. It works fine and it displays my nubmers, but only with the default FullIModeltemTemplate. If I create a new one and add a TextBlock, I am not able to bind its Text property to my numbers.

What do I need to do to bind my numbers in the new FullModelItemTemplate?

Thank you.

1

1 Answers

0
votes

So I found out the way to bind it:

    <DataTemplate x:Key="RadiusLFullItemTemplate">
        <Grid d:DesignWidth="446" d:DesignHeight="79">
            <TextBlock Margin="0" TextWrapping="Wrap" Text="{Binding Path = .}" HorizontalAlignment="Center" FontSize="48"/>
        </Grid>
    </DataTemplate>

Text = {Binding Path =.}" did the trick