Skip to content

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

@michael-hawker

Description

@michael-hawker
Contributor

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.

Activity

added
doc-enhancementfeedback is about suggested additions/improvements to the article, but customer is not blocked
on Sep 17, 2021
added a commit that references this issue on Mar 1, 2023
ea2b9a9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      Participants

      @jwmsft@PRMerger5@michael-hawker@PRMerger7@hkhmsft

      Issue actions

        Window.Current.Bounds contains more information about Position, not just Size · Issue #3319 · MicrosoftDocs/windows-dev-docs