microsoft / microsoft/microsoft-ui-reactor

[Feature] replace hstack and vstack with stack

Open
#513 15 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
C#
Stars
646
Forks
54
Avg merge
1d 3h
Merged PRs (30d)
84

Description

### Problem

greeting reactor team, I hope you are doing fine, I love this new project and I think it will be a very good replacement for xaml, especially for people like me who are tired of xaml limitation and boilerplates and bad debugging experience

in xaml the stack is one control with the ability to change Orientation

```xml

```
in reactor we have
```csharp
VStack() ;
HStack();
```
both feels redundant and can be replaced with one function, the horizontal and vertical stack code and functionalities all almost the same

### Proposed solution

replace both functions with one stack function that use an enum to switch between horizontal and vertical mode

```csharp
Stack(StackMode.Vertical
TextBlock("I love WinUI")
TextBox(opinion , setOpinion, placeholderText: "Your Opinion about WinUI? ")

);
```

### Alternatives considered

_No response_

### 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

Open the contributing guide

Research direction

Start by reviewing the existing VStack and HStack APIs and the 15-comment discussion on this issue. Determine how their current behavior and functionality should map to one Stack API with a horizontal or vertical mode; done means the replacement is specified and both stacking modes remain supported.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.