Skip to content

Window.Current.Bounds contains more information about Position, not just Size #3319

Open
@michael-hawker

Description

@michael-hawker

In the Make code portable across windowing hosts table, the guidance for CoreWindow.GetForCurrentThread().Bounds and Window.Current.Bounds is to use uiElement.XamlRoot.Size. That's fine if you're just trying to get the size of the window; however, Bounds also contained the X,Y position on screen.

More guidance should be provided here on how to retrieve the coordinates properly when hosted in scenarios with multiple window potential. i.e. translating this scenario

FYI @marb2000

Linkback: CommunityToolkit/WindowsCommunityToolkit#3650


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Labels

Pri2design/techdoc-enhancementfeedback is about suggested additions/improvements to the article, but customer is not blockeduwp/prod

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions