-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
SetAppThemeColor crashes with NRE #21503
Comments
the problem is that |
Hi @StephaneDelcroix internal async Task CreateAsync() {
_ items = new ObservableCollection<Test>()
var test = new Test();
test.SetAppThemeColor(Test.IconColorProperty, Colors.Red, Colors.Blue);
_items.Add(test);
//Add more to collection
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(nameof(Items)));
}
public ObservableCollection<Test> Items {
get { return _items; }
} This collection (Items property) is the ItemsSource from a ListView. My goal is if a user changed the theme (dark/light) and the app is running that the color is changing at runtime. Edit: |
Well, that no longer works. Theme propagation is now done through Parenting. You can still subscribe to the AppThemeChanged event yourself, or parent your elements |
with the nightly 10423 the NRE is gone. But now another exeption happens when i change the theme vie system settings:
StackTrace:
Which collection was modified? Downgrading nightly and my app works again. |
Hi @StephaneDelcroix |
Description
Hi,
i updated to a new Nightly and now my app crashes.
This worked in Version="8.0.20-nightly.10298" but crashes in Version="8.0.20-nightly.10394"
Steps to Reproduce
I can repro the crash with this minimal demo:
And then do this:
I receive a crash:
Link to public reproduction project repository
No response
Version with bug
Nightly / CI build (Please specify exact version)
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: