Select to view content in your preferred language

Upgrading Flex 3.X to 4.0 and API 1.X to 2.0

917
3
08-12-2010 02:46 PM
JacksonTrappett
Frequent Contributor
I've been developing a flex app for 6 months in flex 3.x using API 1.x and server 9.3.1.  Now that 10 is out I decided to try compiling in flex 4.0 with API 2.0 and hooking up to our new 10.0 server.  After some debugging everything works great!

Except styles.  All of my colors, fonts and etc that were set up with style sheets are not working at all.  I was able to fix some of them by adding a namespace.

For example I fixed the navigation style by changing from this:
Navigation{
...
}

to this:
esri|Navigation {
...
}


This only seems to work for standard flex components or standard esri components though.

Does anyone know how to fix custom styles -- like for the widgets?

My original widget styles look like this:
.WidgetCanvas{
...
}


Other similar styles like the InfoPopup group are still working, so I'm kind of confused why some of them have broken and others haven't.

My info popup style looks like this and it works fine:
.InfoCanvas{
...
}


Anyone know the simple solution to this?  The not so simple solution is to move everything to spark and skins and such from what I'm reading but that requires a lot of recoding.  I'm fine with the recoding in the long run but just wondering if there's a way to get the old styles going in the mean time.

(My attached image shows the look of the search widget in 3.5 and 4.0.)

Thanks!
Tags (2)
0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
Jackson,

  All you need to do is change the theme to Halo instead of Spark. To do this right click on your project and go to properties and Flex Theme and switch to Abobe Themes - Halo.
0 Kudos
DonCaviness
Occasional Contributor
Robert, I am having the same issues with the styles when upgrading the SFV from 1.3 (flex 3) and 2.0 (flex 4).  I tried your suggestion but it did not solve my problem.  Do you have any other suggestions?
0 Kudos
JacksonTrappett
Frequent Contributor
Thanks Robert, that fixed nearly all of my theme issues!
0 Kudos