Can't get LayoutAnimation to work

Hi! I’m experimenting with Fusetools and so far I’m quite happy. However I don’t seem to be able to get LayoutAnimations to work. I’m using Fusetools v0.8.4 on Windows 8.1 and running this simple test case in the local preview:

<App Theme="Basic">

<DockPanel>
    <Panel ux:Name="greenPanel" Width="300" Height="300" Background="Green" Padding="10">

        <Text TextColor="#ffffff">Green Panel</Text>

        <LayoutAnimation>
            <Resize RelativeTo="LayoutChange" Duration="0.5"/>
            <Move RelativeTo="LayoutChange" Duration="0.5"/>
        </LayoutAnimation>

    </Panel>

    <StackPanel Dock="Bottom" Orientation="Horizontal">

        <Button Text="200">
            <Clicked>
                <Set greenPanel.Width="200"/>
            </Clicked>
        </Button>
        <Button Text="300">
            <Clicked>
                <Set greenPanel.Width="300"/>
            </Clicked>
        </Button>
    </StackPanel>

</DockPanel>

</App>

When clicking the buttons the width changes as expected, but the change is not animated at all. I can’t figure out what I’m doing wrong. I basically copied the example from https://www.fusetools.com/learn/fuse#-layoutanimation-and-multilayoutpanel-.

Is this a bug or am I doing something wrong? Any help would be appreciated. Thanks in advance!

Hi! Just add X="1" to the layout animation property and it should work. (If you animate the Y-property you obviously also add Y="1" or whatever proportion you want to animate.)

There might be old code that works without X and Y being set, I think these recently became hard requirements.

Enjoy!

That’s it! Thanks a bunch! Someone should probably update the documentation over at https://www.fusetools.com/learn/fuse#-layoutanimation-and-multilayoutpanel-.

Will fix that immediately. Sorry about the misinformation