This question directly relates to (the accepted answer of) this question: Change ListView CellTemplate based on state of item, which holds all the relevant XAML in the accepted answer.
One of these states requires a ProgressBar. Which works, except for the fact I can't get it to look and act the way I want it to, which is to take all available horizon and vertical space without taking more space than required.
In an attempt to solve this, I have tried to follow the suggestions given here, but nothing I do seems to have a single effect. The XxxContentAlignment options go ignored, no matter whether I apply them to ContentControl
s, ListViewItem
s or whatever else I came up with along the way. The Binding to the named element also fails, giving me a
Cannot find source for binding with reference
error which refers to its inability to find what the other answer calls col1
. All other suggestions I have found are variations of these, either involving ActualWidth
or its ActualHeight
cousin, or stuff involving RelativeSource
and FindAncestor
.
At this point of trying to fix this rather trivial thing for the last 2 hours, I think I can really use the final nudge to show me in the right direction. (And probably point out the obvious mistakes I've been making...)