-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ShellContent Title doesn't observe changes to bound properties #7453
Comments
So you have to define the bindings yourself using <ShellContent BindingContext="{Binding Tab1}" Title="{Binding Name, Mode=OneWay}" ContentTemplate="{DataTemplate local:TabView}" />
<ShellContent BindingContext="{Binding Tab2}" Title="{Binding Name, Mode=OneWay}" ContentTemplate="{DataTemplate local:TabView}" /> If you change the bindings to |
Wonderful - thank you so much for a swift diagnosis and workaround! |
I can confirm that the workaround works well for me. (As it happens, the name is changed in the background in my real app, before the tab is even visible, so this actually addresses my issue completely. But it's not just about my existing use case, of course :) |
repro with vs main build(32525.350.main) |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Verified this on Visual Studio Enterprise 17.6.0 Preview 7.0. Repro on Windows 11 and Android 13.0 with below Project: |
The same is true for other bindings on ShellContent elements, e.g. showing and hiding tabs in the TabBar by binding to the |
I have the same issue where I have to click on a tab to get the binding to work. But I need it to work on first load. |
Description
I have a shell with a page that itself has two tabs. The title of each tab can change dynamically, so it's set using
<ShellContent Title="{Binding ...}" />
. The binding is active initially, i.e. the title is taken from the binding - but if the bound property changes, the title doesn't change.Steps to Reproduce
Code is in ShellContentTitleBinding.zip
The important parts are:
AppShell.xaml:
TabView.xaml:
The
ChangeName
handler changes the property, which raises the appropriate event.Importantly:
Name
property is used in the title (so the binding is fundamentally making a connection)Name
property is visible in the label in the view (so the binding notification code seems to be okay)Version with bug
Release Candidate 3 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android, Windows
Affected platform versions
Android 11 / Pixel 5 / API 30, Windows10.0.19041.0
Did you find any workaround?
Not yet.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: