开发者

Creating state children before switching to state

开发者 https://www.devze.com 2022-12-23 22:37 出处:网络
In my view I have a welcome screen: <component:WelcomeScreen 开发者_StackOverflowincludeIn=\"welcome\"

In my view I have a welcome screen:

<component:WelcomeScreen
开发者_StackOverflow    includeIn="welcome"
    />

Which is a pretty small component and I have panelContainer:

<component:PanelContainer
    id="panelView"
    includeIn="panels"
    >

    <manyChildren />

</component:PanelContainer>

Whilst the user is reading the warm and fuzzy welcome note in the welcome state I want to be creating the big expensive panels state so taht when we switch there is no delay.

Before the panels state is set panelView is null but I presume there must be an IDefferredInstance floating around somewhere that I can use to kick off the creation of the view. How can I get hold of it?

Thanks


You can set the creationPolicy of your ViewStack to 'all' then all the containers will be created instantly.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号