c# - WPF Wrapping content into maximum 2 columns. Evenly distributed -
I am trying to insert a panel in my WPF application, which will have some very specific behaviors:
1.) The material wraps evenly before moving on to the next column, starting from the top left corner and moving downwards.
2.) I define the maximum number of columns For my purpose, this number will be between 1 and 3.
3.) Allows me to set an initial height, but it will also increase to accommodate additional items. (Setting the initial height only because my content can not wrap without it. If I leave it myself, it all comes out in the same column, whether it fits on the screen or not)
< P>
At this point I have concluded that I am trying I'll need a custom panel, but before I start this process, I would like to explain (and how to do it) that I am not getting a very easy answer.
A A In short: You need a custom panel, underlying ones do not offer a combination of features that you want. wrappanel can be set to wrap vertically, But you have no control over the number of columns. UniformGrid will give you control over the number of columns, but will not be horizontally vertical.
Comments
Post a Comment