The old implementation was using double.MaxValue for the height of the returned RectangleGeometry. This was causing the background to become black. I was unable to root cause why that is happening, but adjusting to a value smaller than double.MaxValue fixes the issue.
I tried to narrow down magic number at which point the black background appears, and it turned out to be 349_023 which is a very random number and therefore something I assume is just specific to my monitor/resolution/DPI setup.
So rather than using some magic number, I changed the converter to a IMultiValueConverter and I am now also passing in the ActualHeight of the (non-scaled) hint, as well as the scaling factor (HintAssist.FloatingScale). This allows me to calculate the required vertical space rather than using double.MaxValue.
The old implementation was not freezing the returned Geometry so I added that as well for the minor perf bump.
Fixes #3564
The old implementation was using
double.MaxValue
for the height of the returnedRectangleGeometry
. This was causing the background to become black. I was unable to root cause why that is happening, but adjusting to a value smaller than double.MaxValue fixes the issue.I tried to narrow down magic number at which point the black background appears, and it turned out to be
349_023
which is a very random number and therefore something I assume is just specific to my monitor/resolution/DPI setup.So rather than using some magic number, I changed the converter to a
IMultiValueConverter
and I am now also passing in theActualHeight
of the (non-scaled) hint, as well as the scaling factor (HintAssist.FloatingScale
). This allows me to calculate the required vertical space rather than usingdouble.MaxValue
.The old implementation was not freezing the returned
Geometry
so I added that as well for the minor perf bump.