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
24.56k stars 2.13k forks source link

Binding priority #731

Open JohanLarsson opened 7 years ago

JohanLarsson commented 7 years ago

In WPF I miss a way to specify what order bindings should resolve. This could speed up for example navigation between expensive views.

I'm thinking something similar to Panel.ZIndex pseudo:

<Grid>
    <Grid Binding.Priority="0">
        ... 
    </Grid>
    <Grid Binding.Priority="1">
        ... 
    </Grid>
</Grid>

In the above sample the children of the grid with priority 0 would get their bindings resolved first.

grokys commented 7 years ago

For this to work, bindings would have to run asynchronously, which they currently don't.

I believe UWP has support for this however: https://msdn.microsoft.com/en-us/windows/uwp/xaml-platform/x-deferloadstrategy-attribute - is that what you mean?

maxkatz6 commented 3 years ago

I think it is closer to xPhase from UWP https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/x-phase-attribute