How do I change site?

When I want to click a button to change page it wont work. It worked before :confused:


How can I change pages now? :frowning:


You really need to post the full code in order for us to have a look at it. Additionally, as the error message hinted, adding the logs here would be an excellent addition.

This is the whole code, there are no errors just node already have parent.

I don’t know the exact reason or how that is related to the error you’re getting, but removing Layer="Background" from the pages fixes the issue.

If you think about it, that kind of makes sense though. A Page shouldn’t really have a Layer="Background", since that takes a node out of the parent visual tree.

Updated your code:

    <Router ux:Name="router" />
    var Observable = require("FuseJS/Observable");
    module.exports = {
        gotoFirst: function() {router.goto("firstPage");},
        gotoSecond: function() {router.goto("secondPage");}
    <PageControl ux:Name="pageControl" Active="firstPage">

        <Page Name="firstPage" Color="#64B5F6">
            <Rectangle Name="opacity" Width="70%" Height="50px" Color="#f00" Opacity="0"> 
                    <Set pageControl.Active="secondPage" />
                    <Change opacity.Opacity="0.1" Duration="0.2" />
            <StackPanel Name="clicklist" Width="70%" Height="50px" Color="#0277BD" Opacity="1">
                <Text FontSize="30" Alignment="Center" Margin="0,10,0,0" TextColor="White">Your Tasks</Text>

        <Page Name="secondPage" Color="#64B5F6">
            <StackPanel Width="100%" Height="100px" Color="#EEEEEE" Alignment="TopCenter">