Web searches show a lot of people (including me) are irritated by the way
ListBox item lengths are ragged (they don't stretch horizontally). Some
sample fixes show how to get the ContentPresenter of the grid which contains
each item and set it to horizontal stretch.
My grid items were wrapped in a Border which then contained the Grid. The
Parent property of the Border was always null, but you can get around it
like this:
private void gridItem_Loaded(object sender, RoutedEventArgs e)
{
Grid g = (Grid)sender;
Border b = (Border)g.Parent;
ContentPresenter p = (ContentPresenter)VisualTreeHelper.GetParent(b);
p.HorizontalAlignment = HorizontalAlignment.Stretch;
}
The GetParent method does the trick.
Greg
_______________________________________________
ozsilverlight mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight