Matey
Matey

Reputation: 197

Remove autogenerated tile in gridView

i have tile menu in GridView. I'm binding data to 15 tiles, but in app i have 16 tiles. But the last one tile isn't binded - and contains this text:

"Windows.UI.Xaml.Controls.ItemsPanelTemplate"

Like the image.enter image description here

  <GridView Margin="25,136,10,10" Tapped="GridView_Tapped" Background="#FF191919">
        <GridView.ItemTemplate>
            <DataTemplate>

                <Grid Margin="10,10,0,0" Background="Black">
                    <Rectangle Fill="#FFF19941" Width="105" Height="105"/>
                    <TextBlock Text="{Binding}" Margin="5,30,0,0" FontSize="25"/>
                </Grid>

            </DataTemplate>
        </GridView.ItemTemplate>

        <x:String>60 BPM</x:String>
        <x:String>70 BPM</x:String>
        <x:String>80 BPM</x:String>




        <x:String>90 BPM</x:String>
        <x:String>100 BPM</x:String>
        <x:String>110 BPM</x:String>
        <x:String>120 BPM</x:String>
        <x:String>130 BPM</x:String>
        <x:String>140 BPM</x:String>
        <x:String>150 BPM</x:String>
        <x:String>160 BPM</x:String>
        <x:String>170 BPM</x:String>
        <x:String>180 BPM</x:String>
        <x:String>190 BPM</x:String>
        <x:String>200 BPM</x:String>



        <ItemsPanelTemplate>
            <WrapGrid MaximumRowsOrColumns="2"  Orientation="Horizontal" HorizontalChildrenAlignment="Stretch" VerticalChildrenAlignment="Stretch"/>
        </ItemsPanelTemplate>

    </GridView>

How can i remove this maybe autogenerated tile ?

Thanks

Upvotes: 1

Views: 93

Answers (1)

The One
The One

Reputation: 4706

That ItemsPanelTemplate is part of the collection, that's why you're getting that extra item with that message

I think you meant

<GridView.ItemsPanelTemplate>

But since you're already getting the visuals you want you might just delete that <ItemsPanelTemplate> element

Upvotes: 1

Related Questions