WinRT - value not in expected range

I need to do FrontApp in C #.

I have an overview page where I got GridView

a preview of the details page. I described it in more detail and took a snapshot in the following thread: WinRT XamlControl Preview Image

I am getting Content-Panel which I am showing in DetailPage from external library.

Since I need a preview of the DetailPage in my reviews, I have to show the same one Panel

in mine GridView Items

.

When I click on Item

it takes me to DetailPage and I get the following error when I try to add a Panel to my DetailPage: The value is out of the expected range.

I guess it is because I already have a panel with equal names in my VisualTree ?! Is this assumption correct? The panel contains a canvas with some xaml elements and onclick-Event triggers on it.

What can I do to fix this error? I don't know how to proceed ..: /

If you need more information, just ask.

+3


source to share


1 answer


You cannot use the same element instance in multiple places in the application, so if the instance is already somewhere in the visual tree, you cannot add it elsewhere either. I don't think duplicate names are a problem unless they are in a scope with the same name, and if they were, you will probably fail during build.



+5


source







All Articles