I don't believe you can set the selectedIndex of a LinkBar
control if you're using an array of objects/strings as a data
provider. Although you could set the selectedIndex if you were
using a ViewStack as a data provider or used a ToggleButtonBar
control instead of a LinkBar.
According to an engineer:
Actually, the original design of LinkBar was that it kept
track of the last selected link only if the LinkBar was bound to a
ViewStack as its dataProvider. A LinkBar bound to an Array-based
dataProvider would not keep track of the last selected link
visually or programmatically (ie: selectedIndex would not update)
because it was considered a grouping of stand-alone links.
ButtonBar operates the same way.