How do I change site?

Back to How-to Discussions
The issue in this thread has been resolved.

Hello

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.

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:

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

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

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

    </PageControl>
</App>
Post Stats
  • 4
    replies
  • 217
    views
  • 3
    users
Frequent Posters