AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
26.05k stars 2.25k forks source link

Add support to Flutter style by Blazor engine #6267

Open congzhangzh opened 3 years ago

congzhangzh commented 3 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

No

Describe the solution you'd like A clear and concise description of what you want to happen.

make avalonia more reative style, like flutter, which really improve productivity


@inject CounterState CounterState

<ContentView>
    <StackLayout>

        <StackLayout Margin="new Thickness(20)">
            <Label Text="@($"You pressed {CounterState.CurrentCount} times")" FontSize="30" />
            <Button Text="Increment from native" OnClick="@CounterState.IncrementCount" Padding="10" />
        </StackLayout>

        <BlazorWebView ContentRoot="WebUI/wwwroot" VerticalOptions="LayoutOptions.FillAndExpand">
            <FirstBlazorHybridApp.WebUI.App />
        </BlazorWebView>

    </StackLayout>
</ContentView>

@code {
    // initialization code
   // blablabla
}

https://devblogs.microsoft.com/aspnet/hybrid-blazor-apps-in-mobile-blazor-bindings-july-update/

@danroth27 please

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. No

Additional context Add any other context or screenshots about the feature request here.

congzhangzh commented 3 years ago

MAUI the end of 2021 .net 6, MAUI with blazor style 2022 .net 7 or maybe 2023 .Net 8?

And then, .Net UI developer will be less and less then?

if mix avalonia with blazor, that maybe another story!

It’s really cool, will Microsoft give some help @nat @migueldeicaza

maxkatz6 commented 3 years ago

Please, keep discussion in already created issue for alternative markup syntax. Alternative markup syntax proposal

robloo commented 3 years ago

https://github.com/AvaloniaUI/Avalonia/issues/2502#issuecomment-631845909

image

robloo commented 3 years ago

MAUI the end of 2021 .net 6, MAUI with blazor style 2022 .net 7 or maybe 2023 .Net 8?

Note that MAUI is going the MVU route with their own syntax and even changes to C# to support it.