Hopefully no one else has already asked this question, but I have searched and cannot find any mention. Feel free to point me in the right direction if I missed another que
try setting the itemwidth property to Auto... see here:
http://msdn.microsoft.com/en-us/library/system.windows.controls.wrappanel.itemwidth(v=vs.110).aspx
to perform this "width set" programmatically, you could do the following, once the control has been rendered.
protected override void OnRender(DrawingContext dc)
{
int largest = 0;
foreach(UIElement child in this.myWrapPanel.Children)
{
if(child.Width>largest)
largest = child.Width;
}
this.myWrapPanel.ItemWidth = largest;
}