-
Notifications
You must be signed in to change notification settings - Fork 743
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
[iOS] ListView Header/HeaderTemplate changes DataContext incorrectly #13173
Comments
@jeromelaban I just tried using latest Uno 5 release and it's still an issue. |
@takla21 can you link the backport that caused this into 4.9 please? |
@Soap-141 the issue you're facing for the sample you built is #212, and it's caused by If you move all the DataContext in a separate class, the header is shown and the binding works with 4.9.45. I'm closing this issue, but feel free to reopen if you have a specific behavior that is incorrect. Here's the updated sample: public sealed partial class MainPage : Page
{
Model _model = new();
public MainPage()
{
this.InitializeComponent();
this.DataContext = _model;
}
private void Button_Click(object sender, RoutedEventArgs e)
{
_ = Frame.Navigate(typeof(TestPage));
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
_model.ListViewHeader.SimpleBinding += 1;
}
}
public class Model
{
public List<int> Source { get; } = new List<int>();
public ListViewHeader ListViewHeader { get; } = new ListViewHeader();
} |
@jeromelaban Main issue that I'm trying to reproduce right now is that my Header DataContext is becoming null after navigation. Think it has been introduced by this https://github.com/unoplatform/uno/pull/12939/files because it wasn't happening before 4.9.45.
|
@jeromelaban Tagged you as asked in meeting. I will also send you a private StackTrace that I manually logged. |
@jeromelaban This issue is not really updated with what we talked about behind the scenes and also not working for that client anymore but if they mentions it you know what it is. |
We're not able to reproduce the issue (neither with Uno 4.10.13, nor 5.0.0-dev.2656), even when navigating from one page to another. An additional test which adds and removes the @Epsil0neR if you are able to augment this new repro to show the behavior you're getting, it will be useful, thanks! |
This issue is fixed in 4.10.34, 5.0 latest, available on nuget. |
Current behavior
Using
ListView.HeaderTemplate
makes the application crash on iOS andListView.Header
is not working at all.Expected behavior
The
ListView.HeaderTemplate
andListView.Header
properties should work.How to reproduce it (as minimally and precisely as possible)
Workaround
N/A
Works on UWP/WinUI
Yes
Environment
Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
NuGet package version(s)
Latest stable.
Affected platforms
iOS
IDE
Visual Studio 2022
IDE version
17.6.5
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: