V
Vanja
List box should be sized in a way that only a certain number of items are
fully visible. The horizontal scrollbar should be considered, if visible.
For instance, the list box contains 10 items, but I want it to have the size
required for exaclty X items to be visible. The other items can of course be
reached by scrolling.
I didn't find any nice method or property to achieve this directly. I tried
finding out the necessary height with some formulas (e.g. height of one item
* X + border width * 2 + ??? for scroll-bar), but it's not really that
straightforward.
Since I am a beginner in WPF (and .NET), I was hoping that someone could
have an idea how to solve this problem.
Thanks,
Vanja
fully visible. The horizontal scrollbar should be considered, if visible.
For instance, the list box contains 10 items, but I want it to have the size
required for exaclty X items to be visible. The other items can of course be
reached by scrolling.
I didn't find any nice method or property to achieve this directly. I tried
finding out the necessary height with some formulas (e.g. height of one item
* X + border width * 2 + ??? for scroll-bar), but it's not really that
straightforward.
Since I am a beginner in WPF (and .NET), I was hoping that someone could
have an idea how to solve this problem.
Thanks,
Vanja