-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Epic] Controls initialization sequence #3519
Labels
difficulty/challenging 🤯
Categorizes an issue for which the difficulty level is reachable with internals understanding
epic
kind/bug
Something isn't working
project/layout 🧱
Categorizes an issue or PR as relevant to layouting and containers (Measure/Arrange, Collections,..)
project/navigation-lifecycle 🧬
Categorizes an issue or PR as relevant to the navigation and lifecycle (NavigationView, AppBar, ...)
Comments
carldebilly
added
kind/bug
Something isn't working
triage/untriaged
Indicates an issue requires triaging or verification
labels
Jul 10, 2020
carldebilly
changed the title
Controls initialization sequence
[EPIC] Controls initialization sequence
Jul 14, 2020
carldebilly
added a commit
that referenced
this issue
Jul 14, 2020
6 tasks
francoistanguay
removed
the
triage/untriaged
Indicates an issue requires triaging or verification
label
Aug 29, 2020
agneszitte
added
the
project/layout 🧱
Categorizes an issue or PR as relevant to layouting and containers (Measure/Arrange, Collections,..)
label
Sep 21, 2020
19 tasks
carldebilly
added a commit
that referenced
this issue
Jan 19, 2021
carldebilly
added a commit
that referenced
this issue
Jan 19, 2021
jeromelaban
added
the
difficulty/tbd
Categorizes an issue for which the difficulty level needs to be defined.
label
Feb 15, 2021
carldebilly
added a commit
that referenced
this issue
Feb 24, 2021
carldebilly
added a commit
that referenced
this issue
Feb 25, 2021
24 tasks
24 tasks
MartinZikmund
added
difficulty/challenging 🤯
Categorizes an issue for which the difficulty level is reachable with internals understanding
and removed
difficulty/tbd
Categorizes an issue for which the difficulty level needs to be defined.
labels
Jun 1, 2021
6 tasks
This was referenced Sep 9, 2021
Closed
6 tasks
MartinZikmund
added
the
project/navigation-lifecycle 🧬
Categorizes an issue or PR as relevant to the navigation and lifecycle (NavigationView, AppBar, ...)
label
May 15, 2023
MartinZikmund
changed the title
[EPIC] Controls initialization sequence
[Epic] Controls initialization sequence
Jun 14, 2023
17 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
difficulty/challenging 🤯
Categorizes an issue for which the difficulty level is reachable with internals understanding
epic
kind/bug
Something isn't working
project/layout 🧱
Categorizes an issue or PR as relevant to layouting and containers (Measure/Arrange, Collections,..)
project/navigation-lifecycle 🧬
Categorizes an issue or PR as relevant to the navigation and lifecycle (NavigationView, AppBar, ...)
Epic issue - Controls initialization sequence
This issue will try to regroup the following ones:
Loading
,Loaded
&Unloaded
events are called too early #2895 Loading, Loaded & Unloaded events are called too earlyLayoutUpdated
may be invoked twice #2769 [Android] LayoutUpdated may be invoked twicePage.NavigatedTo
is invoked afterPage.Loaded
#1478 Page.NavigatedTo is invoked after Page.LoadedFrame.Navigated
and page'sOnNavigatedTo
fire in a different order on android than on uwp. #1863 Frame.Navigated and page's OnNavigatedTo fire in a different order on android than on uwp.ShowAsync()
) inMainPage.Loaded
event #4550 ContentDialog not appearingx:Bind
not working withFrame
navigation #2666ItemsRepeater
OnElementPrepared
is called afterNavigationViewItem.OnApplyTemplate
#4689FrameworkElement
inResources
is not loaded #5208Unloaded
event inContentDialog
is fired when theContentDialog
is opened in Uno.WinUI on MacOS #5404Pivot
items are not lazy loaded #5838LayoutSlot
is zero on first load #7001Sequence of events on UWP
Lets suppose we have 2 controls in a direct parent/child relationship (on the logical tree) called
outer
andinner
. Those 2 controls are created at the same time from the same XAML file like this:Here's the sequence of the initialization of those controls on UWP:
outer
receiveDataContextChanged
eventouter
gets assignments for all setters fromOuterControlStyle
-- note: templates are not materialized yetouter
receiveLoading
eventouter
control template gets materializedouter
gets called forApplyTemplate()
outer
gets called forMeasureOverride()
. Callingbase.MeasureOverride()
will call:a.
inner
receiveDataContextChanged
eventb.
inner
gets assignments for all setters fromInnerControlStyle
c.
inner
receiveLoading
eventd.
inner
control template gets materializede.
inner
gets called forApplyTemplate()
f.
inner
gets called forMeasureOverride()
outer
gets called forArrangeOverride()
. Callingbase.ArrangeOverride()
will call:a.
inner
gets called forArrangeOverride()
outer
receive theSizeChanged
eventinner
receive theSizeChanged
eventouter
receive theLoaded
eventinner
received theLoaded
eventAffected platform(s):
Problems
OnApplyTemplate()
is called during the first measure phase (step 6). Currently on Uno (all platforms) it's called synchronously with the assignation to theTemplate
(ControlTemplate) property (step 4)inner
receives twice t heLoading
eventDataContextChanged
is raised synchronously with the assignation. Should be deferred to the first measure phase (6.a.)Template
assignation andApplyTemplate
is also called immediatly. They should be be deferred to the first measure phase. Or, at least, the call toApplyTemplate
should be deferred.inner
gets unloaded + reloaded after its template has been materializedLoading
should be raised onouter
beforeinner
(incorrect on iOS)SizeChanged
should be raised onouter
beforeinner
(correct only on iOS)SizeChanged
should be raised BEFORE theLoaded
event for bothinner
&outer
(all platforms)Loaded
should be raison onouter
beforeinner
(correct only on Android)The text was updated successfully, but these errors were encountered: