The VisibilityLevels.Half and VisibilityLevels.All options always start with line 1 and the VisibilityLevels.Any option returns strange values when dynamically changing the lines of context.
I believe the issue in both cases is in Helper.GetLineViewportStates(). If the framework element has height 0 it can be considered in the view in many cases (especially for the Half and All options). Adding "ele.ActualHeight > 0" to the list of conditions for isIn should fix this.
The VisibilityLevels.Half and VisibilityLevels.All options always start with line 1 and the VisibilityLevels.Any option returns strange values when dynamically changing the lines of context.
I believe the issue in both cases is in Helper.GetLineViewportStates(). If the framework element has height 0 it can be considered in the view in many cases (especially for the Half and All options). Adding "ele.ActualHeight > 0" to the list of conditions for isIn should fix this.