Repository navigation
Closed
Labels
kind/bugSomething isn't workingplatform/android 🤖Categorizes an issue or PR as relevant to the Android platformtriage/untriagedIndicates an issue requires triaging or verification
Description
Current behavior
Pointer location are not valid
Expected behavior
As UWP
How to reproduce it (as minimally and precisely as possible)
<Grid Background="#FF583793">
<Viewbox Stretch="Uniform" StretchDirection="Both">
<Canvas x:Name="mainCanvas" Height="800" Width="800" Background="#FFA0ACA5" Margin="50,50,50,50" PointerPressed="UIElement_OnPointerPressed">
<TextBlock x:Name="tblInfos" Height="64" Canvas.Left="10" Canvas.Top="10" Text="TextBlock" TextWrapping="Wrap" Width="780" FontSize="20" FontWeight="Bold"/>
<TextBlock x:Name="tblInfos2" Height="64" Canvas.Left="10" Canvas.Top="63" Text="TextBlock" TextWrapping="Wrap" Width="780" FontSize="20" FontWeight="Bold"/>
<Border x:Name="letter" BorderThickness="1" BorderBrush="Black" Height="200" Canvas.Left="50" Canvas.Top="300" Width="500" Background="#FF8D7E3B" HorizontalAlignment="Stretch"/>
</Canvas>
</Viewbox>
</Grid> private void UIElement_OnPointerPressed(object sender, PointerRoutedEventArgs e)
{
var posCanvas = e.GetCurrentPoint(mainCanvas).Position;
var posLetter = e.GetCurrentPoint(letter).Position;
tblInfos.Text = $"canvas x:{posCanvas.X} y:{posCanvas.Y}";
tblInfos2.Text = $"letter x:{posLetter.X} y:{posLetter.Y}";
}Environment
Nuget Package: Uno.UI
Package Version(s): 2.0
Affected platform(s):
- [?] iOS
- Android
- WebAssembly
- WebAssembly renderers for Xamarin.Forms
- Windows
- Build tasks
- Solution Templates
Visual Studio: irrelevant
Relevant plugins: none
Anything else we need to know?
Reacted by Agnès ZITTE and Carl de Billy
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingplatform/android 🤖Categorizes an issue or PR as relevant to the Android platformtriage/untriagedIndicates an issue requires triaging or verification
Activity