microsoft / microsoft/WindowsAppSDK

[DisplayInformation]: DisplayInformation throws exception

Open
#1,609 6 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

area-Graphics theme-UwpParity
Dominant language
C++
Stars
4.7k
Forks
471
Avg merge
3d 13h
Merged PRs (30d)
28

Description

I am working on a .net5 project which uses winrt, I was trying to get the scalefactor from the DisplayInformation Class but calling DisplayInformation.GetForCurrentView() throws exception, is it because core window, core application view is not supported in WPF, it throws an COM exception stating "element not found". Is there any way to overcome this, or should i need to continue with win32 methods itself.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.