Skip to content

[C] Fix typo #29379

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

Merged
merged 1 commit into from
May 8, 2025
Merged

[C] Fix typo #29379

merged 1 commit into from
May 8, 2025

Conversation

StephaneDelcroix
Copy link
Contributor

major facepalm

- fixes #29336
@Copilot Copilot AI review requested due to automatic review settings May 7, 2025 14:02
@StephaneDelcroix StephaneDelcroix requested a review from a team as a code owner May 7, 2025 14:02
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a typo that caused an incorrect type check in the core binding logic and adds tests to validate the ItemDisplayBinding functionality.

  • Added unit tests for ItemDisplayBinding in a new test class.
  • Fixed the type check in BindableObject.cs by replacing BindableProperty with BindingBase.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Controls/tests/Core.UnitTests/ItemDisplayBindingTests.cs New unit tests for the ItemDisplayBinding property in a test view.
src/Controls/src/Core/BindableObject.cs Corrected a type check to use BindingBase instead of BindableProperty to fix a bug.
Comments suppressed due to low confidence (1)

src/Controls/src/Core/BindableObject.cs:485

  • The corrected type check now uses BindingBase instead of BindableProperty, which should resolve the type mismatch issue. Please verify that this change fully addresses the misassignment bug observed in production.
if (value is BindingBase binding && !property.ReturnType.IsAssignableFrom(typeof(BindingBase)))

@@ -482,7 +482,7 @@ public void SetValue(BindableProperty property, object value)
if (property == null)
throw new ArgumentNullException(nameof(property));

if (value is BindingBase binding && !property.ReturnType.IsAssignableFrom(typeof(BindableProperty)))
if (value is BindingBase binding && !property.ReturnType.IsAssignableFrom(typeof(BindingBase)))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when we set BP of type BindingBase, we do not SetBinding, we SetValue. XAML inflators are doing this right, and it only happens when used in code. this is why it was never caught

rmarinho
rmarinho previously approved these changes May 8, 2025
@rmarinho rmarinho moved this from Todo to Approved in MAUI SDK Ongoing May 8, 2025
@rmarinho rmarinho added this to the .NET 9 SR7 milestone May 8, 2025
@PureWeen PureWeen changed the base branch from main to inflight/current May 8, 2025 16:20
@PureWeen PureWeen dismissed rmarinho’s stale review May 8, 2025 16:20

The base branch was changed.

@PureWeen PureWeen merged commit 0ec8856 into inflight/current May 8, 2025
96 of 129 checks passed
@PureWeen PureWeen deleted the dev/stdelc/fix29336 branch May 8, 2025 16:21
@github-project-automation github-project-automation bot moved this from Approved to Done in MAUI SDK Ongoing May 8, 2025
PureWeen pushed a commit that referenced this pull request May 9, 2025
major facepalm

- fixes #29336
PureWeen pushed a commit that referenced this pull request May 13, 2025
major facepalm

- fixes #29336
github-actions bot pushed a commit that referenced this pull request May 13, 2025
major facepalm

- fixes #29336
PureWeen pushed a commit that referenced this pull request May 14, 2025
major facepalm

- fixes #29336
PureWeen pushed a commit that referenced this pull request May 14, 2025
major facepalm

- fixes #29336
github-actions bot pushed a commit that referenced this pull request May 15, 2025
major facepalm

- fixes #29336
PureWeen added a commit that referenced this pull request May 21, 2025
For more information about inflight process check
https://github.com/dotnet/maui/wiki/Inflight-Branch-Process

# .NET MAUI Release Notes

## New Release: May 21, 2025

We're excited to announce a new release of .NET MAUI with several bug
fixes and improvements across various platforms.

### Bug Fixes

#### iOS
- **Map Control**: Fixed crash when navigating to a page containing a
map more than once (#29369)
- **CarouselView**: Fixed bounce-back behavior when Loop=false, ensuring
proper scrolling experience (#29318)
- **UIView**: Fixed NullReferenceException for UIView not being in
UIWindow (#29460)

#### Windows
- **CarouselView**: Fixed HorizontalScrollBarVisibility="Never" not
working properly (#29343)
- **UI Controls**: Fixed the color not being applied to the
Expand/Collapse Chevron icon (#29140)

#### Windows & macOS
- **Modal Navigation**: Fixed issue where Disappearing event was not
triggered when closing a window with a modal page (#29129)

#### Android
- **Modal Pages**: Improved inheritance of StatusBar and NavigationBar
background colors (#28568)
- **Footer Scrolling**: Fixed footer scrolling issues in list controls
(#29381)
- **Modal Pages**: Improved inheritance of StatusBar and NavigationBar
background colors on modal pages (#28568)

#### Cross-Platform
- **CarouselView**: Fixed ItemsLayout runtime updates to ensure proper
layout behavior (#29447)
- **CollectionView**: Fixed various issues in CollectionView
implementation (#29423)

### Testing Improvements
- Added feature matrix UITest cases for CollectionView dynamic changes
(#29424)

### Code Quality
- Fixed code formatting issues across the codebase
- Minor typo corrections (#29379)

### Contributors

This release was made possible by the hard work of our dedicated team
and community contributors. We'd like to extend our gratitude to
everyone who has contributed to this release.

### Installation

This update is available through NuGet and the .NET SDK. Update your
projects to get access to these fixes.

### Known Issues

Please refer to our issue tracker for any known issues and their
workarounds.

---

For more information about .NET MAUI, visit [the official
documentation](https://docs.microsoft.com/dotnet/maui/).
PureWeen pushed a commit that referenced this pull request May 21, 2025
major facepalm

- fixes #29336
@github-actions github-actions bot locked and limited conversation to collaborators Jun 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

BindableProperty for a BindingBase property doesn't trigger PropertyChanging or PropertyChanged
3 participants