This project is read-only.

override ListboxItem HorizontalAlignment property

Dec 30, 2008 at 9:35 AM

First i would like to thank you for this great project,

I was trying to apply it to an old project i got , every thing worked good except for listboxitem, I used a grid inside the template of the listboxitem and it was with stretch width, this didn't work in most of the themes untill i changed

<ContentPresenter HorizontalAlignment="Left" Margin="{TemplateBinding Padding}" />


<ContentPresenter HorizontalAlignment="Stretch" Margin="{TemplateBinding Padding}" />
Dec 30, 2008 at 9:51 AM
Hello again

I was able to fix it also by using this

<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" />

i think this is the correct way to fix that.

Jan 5, 2009 at 9:33 AM
Thank you shahbour,

I have updated all the themes to set the HorizontalAlignment to the following:

HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"

Also note that the same bug applied to ComboBoxItem!

Will post the new version soon...

Kindest regards,