Wrap panel with “kind of” two way wraping?

You definitely can't use a single panel to accomplish that! You can use a stackpanel where to insert multiple and dynamic wrappanel with horizontal orientation to have "column" behavior you need.

Well, I did it. Just wrote a custom wrappanel with the behavior I wanted. Here it is: public class TwoWayWrapPanel : Panel { int _rowCount = 0; public int RowCount { get { return _rowCount; } set { _rowCount = value; } } protected override Size MeasureOverride(Size availableSize) { Size resultSize = new Size(0, 0); double columnWidth = 0; double usedSpace = 0; double nullX = 0; double currentX = 0; double currentY = 0; bool isFirst = true; int row = 0; foreach (UIElement child in Children) { child.

Measure(availableSize); if (isFirst) { columnWidth = child.DesiredSize. Width; resultSize. Width += columnWidth; currentY += child.DesiredSize.

Height; row++; isFirst = false; } else { if (columnWidth >= usedSpace + child.DesiredSize. Width & _rowCount > 1) { currentX = nullX + usedSpace; usedSpace += child.DesiredSize. Width; } else { row++; if (row + 1 > _rowCount | child.DesiredSize.

Width > columnWidth) { row = 0; currentX = nullX + columnWidth; nullX = currentX; usedSpace = 0; columnWidth = child.DesiredSize. Width; currentY = child.DesiredSize. Height; row++; resultSize.

Width += columnWidth; } else { currentY += child.DesiredSize. Height; currentX = nullX; usedSpace = child.DesiredSize. Width; } } } } return resultSize; } protected override Size ArrangeOverride(Size finalSize) { double columnWidth = 0; double usedSpace = 0; double nullX = 0; double currentX = 0; double currentY = 0; bool isFirst = true; int row = 0; foreach (UIElement child in Children) { //First item in the collection if (isFirst) { child.

Arrange(new Rect(currentX, currentY, child.DesiredSize. Width, child.DesiredSize. Height)); columnWidth = child.DesiredSize.

Width; currentY += child.DesiredSize. Height; row++; isFirst = false; } else { //Current item fits so place it in the same row if (columnWidth >= usedSpace + child.DesiredSize. Width & _rowCount > 1) { currentX = nullX + usedSpace; child.

Arrange(new Rect(currentX, currentY, child.DesiredSize. Width, child.DesiredSize. Height)); usedSpace += child.DesiredSize.

Width; } else { row++; //The row limit is reached or the item width is greater than primary item width. Creating new column if (row + 1 > _rowCount | child.DesiredSize. Width > columnWidth) { row = 0; currentY = 0; currentX = nullX + columnWidth; nullX = currentX; usedSpace = 0; child.

Arrange(new Rect(currentX, currentY, child.DesiredSize. Width, child.DesiredSize. Height)); columnWidth = child.DesiredSize.

Width; currentY += child.DesiredSize. Height; row++; } //Item doesn't fit. Adding to the new row in the same column else { usedSpace = 0; currentY += child.DesiredSize.

Height; currentX = nullX; child. Arrange(new Rect(currentX, currentY, child.DesiredSize. Width, child.DesiredSize.

Height)); usedSpace += child.DesiredSize. Width; } } } } return finalSize; } }.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions