Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VisualTreeElement methods need to use DP vs PX #7904

Merged
merged 16 commits into from
Jun 10, 2022

Conversation

PureWeen
Copy link
Member

@PureWeen PureWeen commented Jun 9, 2022

Description of Change

  • Fix GetBoundingBox so that it returns a DP rect opposed to a PX rect
  • Fix the code for calculating if a point is inside a rectangle so that it uses a Rect with DP values since the point that's passed in is using DP.

Issues Fixed

Fixes #4704

@PureWeen PureWeen changed the base branch from main to net6.0 June 9, 2022 18:07
@Redth Redth added this to the 6.0-sr2 milestone Jun 9, 2022
@Redth Redth added the area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging label Jun 9, 2022
@drasticactions drasticactions added the partner/ui-tools .NET UI Tools label Jun 9, 2022
@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@PureWeen PureWeen added the do-not-merge Don't merge this PR label Jun 10, 2022
@PureWeen PureWeen merged commit 357f4e0 into net6.0 Jun 10, 2022
@PureWeen PureWeen deleted the getvisualtreeelement_dp_px_fixes branch June 10, 2022 21:05
drasticactions added a commit to drasticactions/maui that referenced this pull request Jun 28, 2022
When we converted the Visual Diagnostics API to Units (dotnet#7904) we didn't update the Hit Testing layer to take it into account. It was still using pixels, meaning that it was always off when doing in-app element selection.

This PR fixes it so it can be consistent.
PureWeen pushed a commit that referenced this pull request Jun 29, 2022
When we converted the Visual Diagnostics API to Units (#7904) we didn't update the Hit Testing layer to take it into account. It was still using pixels, meaning that it was always off when doing in-app element selection.

This PR fixes it so it can be consistent.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2023
@samhouts samhouts added the fixed-in-6.0.408 Look for this fix in 6.0.408! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging do-not-merge Don't merge this PR fixed-in-6.0.408 Look for this fix in 6.0.408! partner/ui-tools .NET UI Tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Element measurement related API should use platforms units for all platforms
5 participants