I'm currently trying to design a "stats" window that are known to be seen in RPG games, for example, showing how many points are distributed to Attack, Defense and Life.
For example, I have the Property Life in my Class, and in my XAML I have a WrapPanel
where I want to host all these Rectangles
that are going to represent each point the Property Life has, if that Property had the value "5", then 5 Rectangles
would show up inside that WrapPanel
.
Is it possible to do that purely in XAML with DataBinding without resorting to writing code? If purely doing that is not possible, is it possible doing it by writing a converter?
If one of those is possible, how?
I'm trying to make it mostly with Binding without writing code in the backend, to keep the code as less bloated and simple as possible.
EDIT: To clarify, 5 is not the maximum value, it can go as high as the datatype can go, so you have to consider that those Rectangles do have to dynamically be inserted with Binding instead of just inserting them and change the Visibility.