Guys,
I need your help! :-)
Check out this code example:
<ListBox VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="500">
<ListBox x:Name="Item1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="300" BorderBrush="Red" BorderThickness="5">
<ListBox.Items>
<RichTextBox VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="300" SizeChanged="OnInnserItemSizeChanged"/>
<RichTextBox VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="300"/>
<RichTextBox VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="300"/>
</ListBox.Items>
</ListBox>
<ListBox x:Name="Item2" BorderBrush="Green" BorderThickness="5" Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<ListBox.Items>
<RichTextBox VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="300"/>
<RichTextBox VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="300"/>
<RichTextBox VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="300"/>
</ListBox.Items>
</ListBox>
</ListBox>
Now, when i run it and click 'Enter'/'Return' in one of the RichTextBoxes, the outer listbox item (for example x:Name=Item1) stretches to match the new size - but when i delete the newly added row it doesn't resize back to its original size...
Thanx, Gili