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.

Example1

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> example2

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 wrappanel can be set to wrap vertically, But you have no control over the number of columns.

A UniformGrid will give you control over the number of columns, but will not be horizontally vertical.

In short: You need a custom panel, underlying ones do not offer a combination of features that you want.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -