Copy an element

It is posible in UNO to duplicate a element of a page and paste in another page when I invoke a method like Clicked args?

<Page ux:Name="Page1">
    <MyElement />
</Page>

<Page ux:Name="Page2">
    //DUPLICATE MyElement here...
</Page>

Thanks!

Edit: did not work.

Hi, not exactly sure what you mean… do you want to have a copy of the code, or copy of the runtime object?

a copy of the runtime object. In other words I like to show a Panel with all his children in other page when I trigger a button.

Is posible?

No, it is not possible to copy a runtime object generally.

The things you can do is create an ux:Class and instantiate it in both pages, e.g.

<Panel ux:Class="MyElement">
    ... stuff here ...
</Panel>

<Page ux:Name="Page1">
    <MyElement />
</Page>

<Page ux:Name="Page2">
    <MyElement />
</Page>

The above will work, but the two instances of MyElement are distinct, they do not share state.

Ok Thanks! I have to share their status , but I will otherwise.