can not use direct2d in winui3?

mc 4,026 Reputation points
2023-11-29T07:54:03.7233333+00:00
m_pRenderTarget->BeginDraw();
m_pRenderTarget->SetTransform(D2D1::Matrix3x2F::Identity());
m_pRenderTarget->Clear(D2D1::ColorF(D2D1::ColorF::DeepSkyBlue));
m_pRenderTarget->EndDraw();

in winform I can get the result.

User's image

but in winui3 nothing changed why?

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
748 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful