Skip to content
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

NavigationViewHeaderBehaviour does not work correctly when setting HeaderContext to Page #2711

Closed
sibille opened this issue Oct 23, 2018 · 3 comments
Labels
bug The issue relates to the wizard not working or a problem with the generated code. external-issue Used to indicate the issue is not directly in WTS but a third-party.
Milestone

Comments

@sibille
Copy link
Collaborator

sibille commented Oct 23, 2018

Raising a separate issue for this (X-Ref:#1229)

We're facing an issue in the NavViewHeaderBehaviour with CodeBehind.
X:Bind is not working in the DataTemplate when HeaderContext is set to a Page.

Possible workarounds would be:

  • Bind to a HelperClass
  • Not setting HeaderContext and use binding instead of x:bind.

I've attached a solution where you can see the problem and the workaround:
App1.zip

  • App1_XBind_Page: This project shows the problem, binding seems to work fine, but value is not shown.
  • App1_XBind_Helper: Solution 1: Bind to a HelperClass
  • App1_Binding: Solution 2: Use Binding instead of xBind
  • App1_ContentPresenter: This project shows what we suspect is the underlying problem, a ContentPresenter with Content bound to a page does not resolve bindings in ContentTemplate correctly, a ContentPresenter with content bound to another class does.
@sibille sibille modified the milestones: 3.0, 2.5 Oct 24, 2018
@sibille sibille added the bug The issue relates to the wizard not working or a problem with the generated code. label Oct 24, 2018
@sibille sibille added the external-issue Used to indicate the issue is not directly in WTS but a third-party. label Nov 12, 2018
@sibille
Copy link
Collaborator Author

sibille commented Nov 14, 2018

Moving to 3.0 to revisit once problem is solved on the control

@sibille sibille modified the milestones: 2.5, 3.0 Nov 14, 2018
@crutkas crutkas modified the milestones: 3.0, 3.1 Jan 15, 2019
@crutkas
Copy link
Member

crutkas commented Jan 15, 2019

pushing to 3.1 / hot fix depending on WinUI

@sibille
Copy link
Collaborator Author

sibille commented Jan 18, 2019

Looking into this with the WinUI team we think the best solution is using binding for the CodeBehind design pattern.

@sibille sibille modified the milestones: 3.1, Backlog Feb 27, 2019
@sibille sibille closed this as completed Jul 8, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Jun 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug The issue relates to the wizard not working or a problem with the generated code. external-issue Used to indicate the issue is not directly in WTS but a third-party.
Projects
None yet
Development

No branches or pull requests

2 participants