Animation on opening application

I’ve been trying to figure this out for some time, and not really getting anywhere.

Currently, I can get some text to fade in, but cannot get it to fade back out no matter what I do. How am I supposed to go about this?

When the application opens and the panel becomes visible, I’d like some text to fade in, and fade back out a second or so later.

The easiest approach here is probably keyframes.

        <Text Name="txt" Opacity="0">This is text</Text>

        <WhileActive>
            <Change Target="txt.Opacity">
                <Keyframe Value="1" TimeDelta="1"/>
                <Keyframe Value="0" TimeDelta="1"/>
            </Change>
        </WhileActive>

You might of course want to use some other trigger, such as <ActivatingAnimation>, to make it fit your use case.