Click here to Skip to main content
15,891,976 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created a dynamic pivot in which i am adding the pivotitems using a list binding my code is like this.


XML
<phone:Pivot x:Name="pvtDeals" Background="Gray" itemsSource="{Binding CityList}" >
             <phone:Pivot.ItemTemplate>
                    <DataTemplate>
                        <Grid >
                            <Grid.RowDefinitions>
                                <RowDefinition Height="200"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <Image x:Name="imgDeal" Tag="0" Source="{Binding ImageLink}" Stretch="Uniform" HorizontalAlignment="Stretch" Tap="imgDeal_Tap" />
                            <TextBlock Foreground="Red" Text="{Binding Title}" Grid.Row="1" TextWrapping="Wrap"/>
                            <ScrollViewer Grid.Row="2">
                                <TextBlock Foreground="Black" Text="{Binding Description}" TextWrapping="Wrap" Grid.Row="2"/>
                            </ScrollViewer>
                        </Grid>
                    </DataTemplate>
                </phone:Pivot.ItemTemplate>
            </phone:Pivot>




What exactly my problem is that I am getting pivotitem headers as ApplicationName.Model.Cities

Here Cities is a class under model with properties that are binded in the pivot.

How do I get rid of the header text of pivotitems or make it Just Cities
Please help
Posted

1 solution

You could create an instance of the Appname.model.cities in the .cs file of the current xaml code.

something like: var cities = new ApplicationName.Model.Cities()

then set the pvtDeals.ItemSource = cities.{instance or variable that returns a list of the cities from the ApplicationName.Model.Cities class}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900