microsoft / microsoft/microsoft-ui-reactor
[Feature] Make it easy to include Reactor element in existing XAML
- Dominant language
- C#
- Stars
- 646
- Forks
- 54
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 84
Description
### Problem
There seem to be cases where XAML is a great use-case, and other cases where Reactor works great. There are also lots of existing XAML apps that could use an easy way to slowly transition towards Reactor. Having an easy way to create Reactor-based controls to host in XAML markup could be in interesting way to combine best of both worlds.
### Proposed solution
One way this could be accomplished is by having a Reactor host-control, with a reference to the element you want to host by type. For example:
```xml
```
### Alternatives considered
Another approach could be to declare a control from code-behind that can be hosted in XAML. For example:
```cs
public class MyControl : ReactorControl
{
public override Element Render()
{
return VStack();
}
}
```
### Additional context
_No response_
### Confirmation
- [x] I have searched [existing issues and specs](https://github.com/microsoft/microsoft-ui-reactor/issues?q=is%3Aissue) for prior discussion of this idea.
Contributor guide
Research direction
The issue names ReactorHostView, ReactorControl, Element.Render(), and XAML markup but no repository files or tests. Start by locating existing ReactorControl implementations and XAML-hosting patterns, then clarify the host API and lifecycle with maintainers. Done means a supported, tested way to render a Reactor element from existing XAML.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100