locked
Error message: The propery 'Content' is set more than once RRS feed

  • Question

  • User390851 posted

    Hello Why am I getting this error message? The property 'Content' is set more than once

    Thursday, March 19, 2020 6:16 PM

Answers

  • User2148 posted

    Because you have to use a Layout for your page, like StackLayout

    You can’t add Label and Listview directly to the contentpage.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, March 19, 2020 6:35 PM
  • User392919 posted

    This is because you set two views(your Label and ListView) directly within a ContentPage.

    ContentPage only accept one view as it's child element, so usually we use a layout before adding any views into the ContentPage.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, March 20, 2020 1:08 AM

All replies

  • User2148 posted

    Because you have to use a Layout for your page, like StackLayout

    You can’t add Label and Listview directly to the contentpage.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, March 19, 2020 6:35 PM
  • User392919 posted

    This is because you set two views(your Label and ListView) directly within a ContentPage.

    ContentPage only accept one view as it's child element, so usually we use a layout before adding any views into the ContentPage.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, March 20, 2020 1:08 AM