简体   繁体   中英

Is it not possible to place more than one grid in the same pivot page?

I have a set of three elements:image and 2 text boxes and on click on any place in these 3 elements I want to trigger and event. So I placed all the three of them in a grid in a pivot item. When I tried to place one more grid item like it, it throws an error like the property content is set more than once. Is it not possible to place more than one grid in the same pivot page? If not possible, how can i define an area that has three elements and use a gesture to trigger an event for the same?

You can only have one Content item within each PivotItem.

If you do need multiple Grid's then place them inside a parent Panel - eg inside a StackPanel or inside another Grid.

<PivotItem>
    <StackPanel>
        <Grid />
        <Grid />
        <Grid />
    </StackPanel>
</PivotItem>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM