Using an itemRenderer from MXML is very easy: Set the itemRenderer property to the class name of the itemRenderer - that's it. But things start to get complicated, if you want to customize some properties of this itemRenderer.
The solution to this problem is to build a function that wraps a ClassFactory around the itemRenderer class and that injects the necessary properties.
public static function createRendererWithProperties(renderer:Class,
properties:Object ):IFactory {
var factory:ClassFactory = new ClassFactory(renderer);
factory.properties = properties;
return factory;
}
<mx:List dataProvider="{['Foo', 'Bar']}" itemRenderer="{createRendererWithProperties(Label, {toolTip: 'Hello'})}"/>