-
Notifications
You must be signed in to change notification settings - Fork 724
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
ItemsRepeater
OnElementPrepared
is called after NavigationViewItem.OnApplyTemplate
#4689
Open
9 of 24 tasks
Labels
difficulty/challenging 🤯
Categorizes an issue for which the difficulty level is reachable with internals understanding
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, ...)
project/third-party 3️⃣
Categorizes an issue or PR as relevant to 3rd party libraries
Comments
MartinZikmund
added
kind/bug
Something isn't working
triage/untriaged
Indicates an issue requires triaging or verification
project/third-party 3️⃣
Categorizes an issue or PR as relevant to 3rd party libraries
and removed
triage/untriaged
Indicates an issue requires triaging or verification
labels
Dec 8, 2020
MartinZikmund
added a commit
to MartinZikmund/Uno
that referenced
this issue
Dec 8, 2020
- Uno specific workaround for initialization problems - issue unoplatform#4689 - Temporary uncomment of assert in ItemsRepeater VirtualizationInfo - issue unoplatform#4691
9 tasks
MartinZikmund
added a commit
to MartinZikmund/Uno
that referenced
this issue
Dec 10, 2020
- Uno specific workaround for initialization problems - issue unoplatform#4689 - Temporary uncomment of assert in ItemsRepeater VirtualizationInfo - issue unoplatform#4691
MartinZikmund
added a commit
to MartinZikmund/Uno
that referenced
this issue
Dec 10, 2020
- Uno specific workaround for initialization problems - issue unoplatform#4689 - Temporary uncomment of assert in ItemsRepeater VirtualizationInfo - issue unoplatform#4691
MartinZikmund
added a commit
to MartinZikmund/Uno
that referenced
this issue
Dec 16, 2020
- Uno specific workaround for initialization problems - issue unoplatform#4689 - Temporary uncomment of assert in ItemsRepeater VirtualizationInfo - issue unoplatform#4691
ajpinedam
pushed a commit
to ajpinedam/uno
that referenced
this issue
Dec 17, 2020
- Uno specific workaround for initialization problems - issue unoplatform#4689 - Temporary uncomment of assert in ItemsRepeater VirtualizationInfo - issue unoplatform#4691
MartinZikmund
added a commit
to MartinZikmund/Uno
that referenced
this issue
Dec 19, 2020
- Uno specific workaround for initialization problems - issue unoplatform#4689 - Temporary uncomment of assert in ItemsRepeater VirtualizationInfo - issue unoplatform#4691
MartinZikmund
added a commit
to MartinZikmund/Uno
that referenced
this issue
Dec 20, 2020
- Uno specific workaround for initialization problems - issue unoplatform#4689 - Temporary uncomment of assert in ItemsRepeater VirtualizationInfo - issue unoplatform#4691
MartinZikmund
added a commit
to MartinZikmund/Uno
that referenced
this issue
Dec 20, 2020
- Workarounds to make NavigationViewItems initialize properly - Now builds on Android - NavigationViewItem is properly initialized on .NET Standard targets - Uno specific workaround for initialization problems - issue unoplatform#4689 - Temporary uncomment of assert in ItemsRepeater VirtualizationInfo - issue unoplatform#4691 - Move pane toggle buttons to the bottom of control template to work around Canvas.ZIndex - Fix UWP build
MartinZikmund
added a commit
to MartinZikmund/Uno
that referenced
this issue
Dec 20, 2020
- Workarounds to make NavigationViewItems initialize properly - Now builds on Android - NavigationViewItem is properly initialized on .NET Standard targets - Uno specific workaround for initialization problems - issue unoplatform#4689 - Temporary uncomment of assert in ItemsRepeater VirtualizationInfo - issue unoplatform#4691 - Move pane toggle buttons to the bottom of control template to work around Canvas.ZIndex - Fix UWP build
The |
MartinZikmund
added a commit
to MartinZikmund/Uno
that referenced
this issue
Dec 30, 2020
- Fixes unoplatform#4809 - in some cases on some Uno targets, the lifecycle events are in such order that causes presenters of dynamically added NavigationViewItems not to be initialized properly. These changes work around this problem when selection indicator is requeste. These changes can be reverted when unoplatform#4689 is fixed.
jeromelaban
added
the
project/layout 🧱
Categorizes an issue or PR as relevant to layouting and containers (Measure/Arrange, Collections,..)
label
Jan 4, 2021
jeromelaban
added
the
difficulty/tbd
Categorizes an issue for which the difficulty level needs to be defined.
label
Feb 15, 2021
6 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 2, 2021
MartinZikmund
changed the title
ItemsRepeater OnElementPrepared is called after NavigationViewItem.OnApplyTemplate
Jun 1, 2023
ItemsRepeater
OnElementPrepared
is called after NavigationViewItem.OnApplyTemplate
MartinZikmund
added
the
project/navigation-lifecycle 🧬
Categorizes an issue or PR as relevant to the navigation and lifecycle (NavigationView, AppBar, ...)
label
Jun 1, 2023
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
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, ...)
project/third-party 3️⃣
Categorizes an issue or PR as relevant to 3rd party libraries
Current behavior
In UWP, the
NavigationVIewItem.SetNavigationViewParent
method is called beforeOnApplyTemplate
, which is needed to properly initialize the items andNavigationVIewItemPresenters
. TheSetNavigationViewParent
is called fromOnRepeaterElementPrepared
handler, which unfortunately runs after item'sOnApplyTemplate
executes in Uno (reproduced on Android, WASM, Skia, probably happens on others too). In addition, I noticed that when I run theHierarchicalNavigationViewMarkup
test page (inNavigationView
section of samples app), an assert fails inVirtualizationInfo.MoveOwnershipToLayoutFromElementFactory
, maybe it is related somehow. Currently I have worked around theSetNavigationViewParent
problem by walking up the Visual tree (see theNavigationViewItemBase.FindAncestorNavigationView
method), but that does help on Skia and WASM only, whereas on Android and iOS, the parent is not yet set whenOnApplyTemplate
is called.The problem is likely related to the lifetime events order.
Expected behavior
OnElementPrepared
should be called beforeOnApplyTemplate
.How to reproduce it (as minimally and precisely as possible)
See above.
Workaround
Currently worked around in
ItemsRepeater
andNavigationView
source.Environment
Nuget Package:
Nuget Package Version(s):
Affected platform(s):
IDE:
Relevant plugins:
Anything else we need to know?
The text was updated successfully, but these errors were encountered: