     //  Properties
     //
     //--------------------------------------------------------------------------
+    
+    /**
+     *  @private
+     */
+    
+    private var _orientation:Number;	// 0 for vertical, 1 for horizontal
+    
+    override protected function measure():void
+    {
+    	// TODO: This is temporary code to make sure the item renderer
+    	// fills out the width of the parent when layout is vertical,
+    	// and the height of the parent when the layout is horizontal.
+    	// Need to figure out a permanent solution for this
+    	if (parent is DataGroup)
+    	{
+    		if (DataGroup(parent).layout is VerticalLayout)
+    		{
+    			if (_orientation != 0)
+    			{
+    				_orientation = 0;
+    				percentWidth = 100;
+    				percentHeight = NaN;
+    			}
+    		}
+    		else if (DataGroup(parent).layout is HorizontalLayout)
+    		{
+    			if (_orientation != 1)
+    			{
+    				_orientation = 1;
+    				percentWidth = NaN;
+    				percentHeight = 100;
+    			}
+    		}
+    		else if (!isNaN(_orientation))
+    		{
+    			_orientation = NaN;
+    			percentWidth = percentHeight = NaN;
+    		}
+    	}
+    	
+    	super.measure();
+    }
     
     /**
      *  @private

{
import flash.events.MouseEvent;

import flex.core.MXMLComponent;

/**
 *  The ItemRenderer class is the base class for List item renderers.

	{
		super();
		
		addHandlers();
	}
	
