@@ -19,11 +19,11 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
19
19
/// </summary>
20
20
public partial class RichSuggestBox
21
21
{
22
- private static bool IsElementOnScreen ( UIElement element , double offsetX = 0 , double offsetY = 0 )
22
+ private static bool IsElementOnScreen ( FrameworkElement element , double offsetX = 0 , double offsetY = 0 )
23
23
{
24
24
var toWindow = element . TransformToVisual ( Window . Current . Content ) ;
25
25
var windowBounds = ApplicationView . GetForCurrentView ( ) . VisibleBounds ;
26
- var elementBounds = new Rect ( offsetX , offsetY , element . ActualSize . X , element . ActualSize . Y ) ;
26
+ var elementBounds = new Rect ( offsetX , offsetY , element . ActualWidth , element . ActualHeight ) ;
27
27
elementBounds = toWindow . TransformBounds ( elementBounds ) ;
28
28
elementBounds . X += windowBounds . X ;
29
29
elementBounds . Y += windowBounds . Y ;
@@ -33,15 +33,15 @@ private static bool IsElementOnScreen(UIElement element, double offsetX = 0, dou
33
33
return elementBounds . Top * scaleFactor >= 0 && elementBounds . Bottom * scaleFactor <= displayHeight ;
34
34
}
35
35
36
- private static bool IsElementInsideWindow ( UIElement element , double offsetX = 0 , double offsetY = 0 )
36
+ private static bool IsElementInsideWindow ( FrameworkElement element , double offsetX = 0 , double offsetY = 0 )
37
37
{
38
38
var toWindow = element . TransformToVisual ( Window . Current . Content ) ;
39
39
var windowBounds = ApplicationView . GetForCurrentView ( ) . VisibleBounds ;
40
40
windowBounds = new Rect ( 0 , 0 , windowBounds . Width , windowBounds . Height ) ;
41
- var elementBounds = new Rect ( offsetX , offsetY , element . ActualSize . X , element . ActualSize . Y ) ;
41
+ var elementBounds = new Rect ( offsetX , offsetY , element . ActualWidth , element . ActualHeight ) ;
42
42
elementBounds = toWindow . TransformBounds ( elementBounds ) ;
43
43
elementBounds . Intersect ( windowBounds ) ;
44
- return elementBounds . Height >= element . ActualSize . Y ;
44
+ return elementBounds . Height >= element . ActualHeight ;
45
45
}
46
46
47
47
private static string EnforcePrefixesRequirements ( string value )
0 commit comments