将 Flex 3.5 项目转换为 Flex 4.0 - 样式警告
我正在将我的项目从 Flex 3.5 平台转移到 Flex 4.0。我能够删除所有编译时错误。我只剩下大约。 1000 条警告,全部都在样式上。
我已经使用了所有 mx 组件,因为之前我的项目是在 Flex 3.5 中。我无法更改控件,因为这会妨碍他们的外观和视野。我在控件上应用的所有样式,其中一些现在已被弃用。请在 Flex 4 中为它们建议一个解决方法。
属性为:
Button -> fillColor、fillApha
画布 -> borderThickness
组合框 -> borderColor、themeColor、fillColor、fillApha
TextArea -> backgroundColor、backgroundAlpha、themecolor、cornerRadius
TextInput -> backgroundColor、backgroundAlpha、themeColor
所有这些属性在 mxml 组件中都是不允许的,并且它们也会在 CSS 文件中发出警告。我还在 CSS 文件的开头包含了命名空间:
@namespace "http://www.adobe.com/2006/mxml";
@namespace mx“library://ns.adobe.com/flex/mx”;
@namespace fx“library://ns.adobe.com/flex/spark”;
@命名空间flexlib“http://code.google.com/p/flexlib/”;
mx|CheckBox.shadeChk { upIcon:嵌入(源=“资产/图像/CL_collapse_close.png”); overIcon:嵌入(源=“资产/图像/CL_collapse_close.png”); downIcon:嵌入(源=“资产/图像/CL_collapse_close.png”); selectedUpIcon:嵌入(源=“资产/图像/CL_collapse_open.png”); selectedOverIcon:嵌入(源=“资产/图像/CL_collapse_open.png”); selectedDownIcon:嵌入(源=“assets/images/CL_collapse_open.png”); 左填充:0;右填充:0; 顶部填充:0;底部填充:0; .....
。
请指导我如何在 Spark 主题中获得与 Flex 4 相同的 UI
谢谢, 尼蒂卡
I am shifting my project from Flex 3.5 platform to Flex 4.0. I am able to remove all compile time errors. All I am left with is approx. 1000 warnings and all are on styles.
I have used all mx components as earlier my project was in Flex 3.5. and i cannot change the controls to because it will hamper their look and field. All the styles that I have applied on controls, some of them are now depreciated. Please suggest a workaround for them in flex 4.
Properties are:
Button - > fillColor, fillApha
Canvas -> borderThickness
ComboBox -> borderColor, themeColor, fillColor, fillApha
TextArea -> backgroundColor, backgroundAlpha, themecolor, cornerRadius
TextInput -> backgroundColor, backgroundAlpha, themeColor
All these properties are not allowed in mxml components and they are giving warnings in CSS files also. I have included namespaces also in the beginning of CSS file as:
@namespace "http://www.adobe.com/2006/mxml";
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace fx "library://ns.adobe.com/flex/spark";
@namespace flexlib "http://code.google.com/p/flexlib/";
mx|CheckBox.shadeChk
{
upIcon: Embed(source="assets/images/CL_collapse_close.png");
overIcon: Embed(source="assets/images/CL_collapse_close.png");
downIcon: Embed(source="assets/images/CL_collapse_close.png");
selectedUpIcon: Embed(source="assets/images/CL_collapse_open.png");
selectedOverIcon: Embed(source="assets/images/CL_collapse_open.png");
selectedDownIcon: Embed(source="assets/images/CL_collapse_open.png");
paddingLeft: 0; paddingRight: 0;
paddingTop: 0; paddingBottom: 0;
}
.....
Please guide me how can i get the same UI with Flex 4 in spark theme.
Thanks,
Nitika
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
按钮 FillColor 和 FillAlpha 需要在 Spark 皮肤中指定,或者您可以指定按钮使用光环皮肤,然后您可以在 CSS 文件或 fx:Style 标记中指定它们。
你能把Canvas改成as:BorderContainer吗? s:BorderContainer 具有可以在 MXML 中设置的 BorderWeight 属性。
对 TextArea 和 TextInput 尝试上面的建议(将皮肤设置为光环皮肤),否则默认情况下您将获得 Spark 皮肤,并且必须创建自定义皮肤。
Button FillColor and FillAlpha need to be specified in a skin for spark skins, or you can specify to use the halo skin for the button and then you can specify them in a CSS file or fx:Style tag.
Can you change the Canvas to a s:BorderContainer? s:BorderContainer has the BorderWeight property that can be set in MXML.
Try the Suggestion above (with setting the skin to the halo skin) for TextArea and TextInput, otherwise you will get a spark skin by default and you will have to create a custom skin.