Skip to content

[Feature] Make it easy to include Reactor element in existing XAML #145

@dotMorten

Description

@dotMorten

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:

<Grid>
   <ReactorHostView Element="local:MyElement" />
<Grid>

Alternatives considered

Another approach could be to declare a control from code-behind that can be hosted in XAML. For example:

public class MyControl : ReactorControl
{
   public override Element Render()
   {
      return VStack(); 
   }
}

Additional context

No response

Confirmation

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions