1

Cardlayout and Scrollview [closed]

asked 2013-01-23 21:21:08 +0800

rdgrimes gravatar image rdgrimes
735 7

updated 2013-01-23 21:21:46 +0800

The new Cardlayout and Scrollview are great components, but I don't see a way to apply a model so the content can be dynamic.

Once again, the examples unhelpfully use static children or script/zscript supplied children.

I'm at a loss of how to supply a dynamic set of images as children to either of these components - under MVVM, since neither component appears to support a children or model attribute.

delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by rdgrimes
close date 2013-01-24 15:38:57

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-01-24 06:47:49 +0800

francishsiao gravatar image francishsiao
145 2

updated 2013-01-24 06:59:35 +0800

Hi rdgrimes,
To supply a dynamic set of images as children to Cardlayout or Scrollview under MVVM, we can use children binding with <template>, as following:

<cardlayout children="@load(vm.imgSrcSet)" width="300px" height="200px" selectedIndex="1">
    <template name="children">
        <image src="@load(each)"/>
    </template>
</cardlayout>
link publish delete flag offensive edit

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-01-23 21:21:08 +0800

Seen: 64 times

Last updated: Jan 24 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More