You have probably used mx:ViewStack, mx:TabNavigator and mx:Accordion somewhere in your Flex development efforts over the last 5+ years and had code that looks like this:
<mx:TabNavigator width="400" height="200" horizontalCenter="0" y="15">
<mx:VBox label="Tab 1">
<mx:Label text="This is tab 1"/>
</mx:VBox>
<mx:VBox label="Tab 2">
<mx:Label text="This is tab 2"/>
</mx:VBox>
<mx:VBox label="Tab 3">
<mx:Label text="This is tab 3"/>
</mx:VBox>
</mx:TabNavigator>
<mx:Accordion width="400" height="200" horizontalCenter="0" y="225">
<mx:VBox label="Accordion 1">
<mx:Label text="This is Accordion 1"/>
</mx:VBox>
<mx:VBox label="Accordion 2">
<mx:Label text="This is Accordion 2"/>
</mx:VBox>
<mx:VBox label="Accordion 3">
<mx:Label text="This is Accordion 3"/>
</mx:VBox>
</mx:Accordion>
Perhaps you would like to continue to use TabNavigator and Accordion within your Flex 4 efforts but you would like the children to be Spark components. Since there is no equivalent to these components yet within Spark, you will need still need to use the mx namespace within your Flex 4 application. If you have tried something like this:
<mx:TabNavigator width="400" height="200" horizontalCenter="0" y="15">
<s:VGroup>
<s:Label text="This is tab 1"/>
</s:VGroup>
<s:VGroup>
<s:Label text="This is tab 2"/>
</s:VGroup>
<s:VGroup>
<s:Label text="This is tab 3"/>
</s:VGroup>
</mx:TabNavigator>
<mx:Accordion width="400" height="200" horizontalCenter="0" y="225">
<s:VGroup>
<s:Label text="This is Accordion 1"/>
</s:VGroup>
<s:VGroup>
<s:Label text="This is Accordion 2"/>
</s:VGroup>
<s:VGroup>
<s:Label text="This is Accordion 3"/>
</s:VGroup>
</mx:Accordion>
You will have received an error that said “The children of Halo navigators must implement INavigatorContent.“. So, what does this mean? Are you screwed and forced to start over and redesign your UI? No, the fix is easy, just wrap your Spark components in a
Spark NavigatorContent component.
<mx:TabNavigator width="400" height="200" horizontalCenter="0" y="15">
<s:NavigatorContent label="Tab 1">
<s:VGroup>
<s:Label text="This is tab 1"/>
</s:VGroup>
</s:NavigatorContent>
<s:NavigatorContent label="Tab 2">
<s:VGroup>
<s:Label text="This is tab 2"/>
</s:VGroup>
</s:NavigatorContent>
<s:NavigatorContent label="Tab 3">
<s:VGroup>
<s:Label text="This is tab 3"/>
</s:VGroup>
</s:NavigatorContent>
</mx:TabNavigator>
<mx:Accordion width="400" height="200" horizontalCenter="0" y="225">
<s:NavigatorContent label="Accordion 1">
<s:VGroup>
<s:Label text="This is Accordion 1"/>
</s:VGroup>
</s:NavigatorContent>
<s:NavigatorContent label="Accordion 2">
<s:VGroup>
<s:Label text="This is Accordion 2"/>
</s:VGroup>
</s:NavigatorContent>
<s:NavigatorContent label="Accordion 3">
<s:VGroup>
<s:Label text="This is Accordion 3"/>
</s:VGroup>
</s:NavigatorContent>
</mx:Accordion>
分享到:
相关推荐
The relationship between MXML and ActionScript classes. . . . . . . . . . . . . . . . . . 37 How MXML relates to standards. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43...
Marionette.Viewstack Marionette 的视图堆栈实现安装可能...选择(backbone.viewstack)[ ] (backbone.viewstack.js)[ ] backbone.viewstack.js看起来更高级,并且有一个很棒的演示,但它没有满足我的需求,我不需要定义
使用viewstack切换登录的简单例子
MXViewStackEffectExample FLEX切换效果
Flex 实现viewstack简单切换。
Eflex_v1.01 18种效果 实现对viewstack加入效果 采用Eflex_v1.01.swf 参看链接:http://sensun.qz5z.com/post/186/2/1/
demo1工程源码 博文链接:https://momoko8443.iteye.com/blog/192423
<mx:ViewStack id="viewStack" width="100%" height="75%" creationComplete="showData()" change="viewChanged(event)"> <mx:HBox id="columnBox" name="ColumnChart" width="100%"> <mx:ColumnChart id=...
ViewStack component for Silverlight 2 – An inevitable control in RIA space。
使用本地拖拽(Drag-and-Drop)API 23.11节.与操作系统剪贴板交互 23.12节.添加HTML内容 23.13节.在ActionScript和JavaScript之间跨脚本操作 23.14节.本地SQL数据库 23.15节.检测和监控网络连接 23.16节.检测用户是否...
<mx:ViewStack height="100%" width="100%" paddingLeft="10" paddingRight="10" paddingTop="10" > <mx:VBox id="detail1" height="100%" width="100%"> <mx:Grid height="100%" width="100%" ...
NULL 博文链接:https://xiaoxiong0913.iteye.com/blog/712006
Table of Contents ...8.1基本组件使用[Tree,datagrid,TitleWindow,ViewStack] 40 8.2读写XML 40 8.3读写ShareObject 40 8.4 BlazeDS配置及使用 40 8.5 回溯 40 8.6 Event 40 8.7 代码优化 40 8.8 Demo 40
/ am viewstack项目,例如/ am viewstack默认值:dirt 查看您的缓冲区:/ am viewbuffer 获取wielditem的引擎名称:/ am getname 查看日志:/ am viewlog 查看您的订单:/ am vieworder(输出将类似于:ORDERNUMBER ...
我跟WonJia打算写一个类似于《Flex编程注意之XX》的系列文章,此系列文章主要就是介绍一些我们在实际的项目中发现的一些Flex的问题,而这些问题可能已经被人发现了,也可能没被人发现,所以在此记录一下。
xmlplus 是一个JavaScript框架,用于快速开发前后端项目。这篇文章主要介绍了xmlplus组件设计系列之路由,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
文件有两个文档组成,Rotate3D.mxml为主文件,DistortionEffects.swc拷贝到libs下面,运行主文件即可,已经调试没有问题了,实现了ViewStack 切换的3D效果,很实用,不需要琐碎的代码,一看就懂!flex4也OK!
flex开发中的一些小例子,这个是用viewstack控件开发的跳转功能