I have an integer MyProperty in MyClass and I would like to bind the number of ellipses shown in my view to that property:
<StackPanel>
... Show MyProperty number of ellipses ...
</StackPanel>
I have had a look at ItemsControl but the ItemsSource requires a collection.
Is there a way of repeating a number of shapes by binding to a simple property?
(Using XAML)
Thanks for reading,
David
You cannot repeat a shape X times as you described, but what you can do – is to write a ValueConverter that would convert number X into an enumeration of X items.