I am working on a Windows10 machine developing a cross platform mobile app. I have a fresh install of MSVS 2022. I switched from MSVS 2019 so I could move to MAUI. I am rewriting a project I did in Xamarin into a MAUI project. During this rewrite, I ran into this double box problem. I want to create a 100x100 rotated box and define it as a touch region. The unrotated box functions as the actual touch region. I have simplified the code and am posting the xaml and cs files along with a screenshot. Thanx in advance for any clue.

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="My_App.MainPage">
<AbsoluteLayout x:Name="MainLayout"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
</AbsoluteLayout>
</ContentPage>
namespace My_App
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
CreateEPRBoxInView();
}
private void CreateEPRBoxInView()
{
var boxEPR = new BoxView
{
Color = Colors.Red,
Opacity = .5,
Rotation = 45,
};
MainLayout.Children.Add(boxEPR);
AbsoluteLayout.SetLayoutBounds(boxEPR, new Rect(100, 100, 100, 100));
var tapGestureRecognizer = new TapGestureRecognizer();
tapGestureRecognizer.Tapped += (sender, e) =>
{
};
boxEPR.GestureRecognizers.Add(tapGestureRecognizer);
}
}
}
I have tried everything i can think of. I have defined the box with heightRequest = 50 and widthRequest = 50. Then it does the same double box with 50x50 sizes, even though the rect is defining 100x100. This happens on the emulator and on my Galaxy S23 Ultra. It looks like it is drawing the defined rectangle and the rotated box. I would expect the region defined in rect to not be drawn as an actual box. Update: I believe this is a bug. If the box was not rotated, you would never see the underlying box which is the touch region. If i did not rotate the box, this would have never been noticed. It would still be noticed if the box were transparent as seen in the screen shot. This was not a problem in Xamarin.