The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

C# UWP: All canvas.children are being lost RRS feed

  • Question

  • I click a button on the screen. The click calls the following proc which is trying to delete a file from Local Storage

        KillKeyFiles();  <<===which as he following line

       var files = await assets.GetFilesAsync();

    The entire canvas gets blanked. Seriously, all code added children go away, but not the one added in XAML.  The call works. I get a list of the files

    Debugging.  I added 2 enumerations thru canvas.children.  One before this line and one after, in the KillKeyFiles proc.  The first one works as expected and has about 250 children.  The 2nd, after the offending line, only has 1.

    One last debug. I comment out the line, and those that would have used it.  Children still there. So, it is that line causing the problem.

    Tuesday, November 5, 2019 3:53 PM

All replies

  • There seems to be something else going on.  Several things are gone wonkie and whatever it is causes this behavior.  Ill put in an update when I get it chased down more.
    Tuesday, November 5, 2019 9:20 PM
  • just Delete this thread.  I t  has to be a stupid user error.  Im looking for it.   Im trying to delete the thread.  Ill post again if I need to.
    Tuesday, November 5, 2019 9:27 PM
  • I tired to delete the thred.. I get Unexpected error
    Tuesday, November 5, 2019 11:59 PM
  • Hi,

    Never mind about this. 

    Have you found an answer about this issue so that you want to delete the thread? If it is, you could share the answer here and mark it as the answer.

    By the way, We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A (Preview)!

    Best regards,


    "Developing Universal Windows apps" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    Wednesday, November 6, 2019 12:57 AM