microsoft / microsoft/microsoft-ui-xaml

How do I obtain the DesktopSiteBridge object in an instance of the WinUI 3 Window class?

Open
#10,082 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-XamlWindow needs-triage
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

How do I obtain the DesktopSiteBridge object in an instance of the WinUI 3 Window class?

-------------------------------

如何获取 WinUI 3 Window 类实例下的 DesktopSiteBridge 对象?


WinUI 3 的 Window 类的实例是对 DesktopWindowXamlSource 创建窗口的一个高级包装,如何在 Window 类实例中获取 DesktoSiteBridge 对象?我在 WinUI 3 源代码中发现了 IContentIslandPartner 接口,通过这个接口可以把 ContentIsland 对象转换为 DesktopSiteBridge 对象,请问一下这个接口该怎么实现呢?

-------------------------------

The Window class instance of WinUI 3 is a high-level wrapper for the DesktopWindowXamlSource creation Window. How to obtain the DesktoSiteBridge object in the Window class instance? I found IContentIslandPartner interface in WinUI 3 source code, through which ContentIsland object can be converted to DesktopSiteBridge object, may I ask how to implement this interface?


Image
https://github.com/microsoft/microsoft-ui-xaml/blob/d74a0332cf0d5e58f12eddce1070fa7a79b4c2db/src/dxaml/xcp/dxaml/lib/XamlRoot_Partial.cpp#L284

Contributor guide

Open the contributing guide

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.

Research direction

Start with src/dxaml/xcp/dxaml/lib/XamlRoot_Partial.cpp around line 284 and the IContentIslandPartner interface referenced in the issue. Determine whether a supported path exists from a WinUI 3 Window instance to DesktopSiteBridge, and document or expose the intended approach if one is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.