-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fixed the OnPlatform does not work for header property in Collection view #28935
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
base: main
Are you sure you want to change the base?
Conversation
Hey there @@NanthiniMahalingam! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- src/Controls/tests/TestCases.HostApp/Issues/Issue25124.xaml: Language not supported
@@ -224,6 +224,17 @@ internal static object ConvertTo(this object value, Type toType, Func<TypeConver | |||
} | |||
} | |||
|
|||
// When toType is object and value is OnPlatform<T>, we need to return the wrapped value from IWrappedView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment references 'IWrappedView' while the code uses 'IWrappedValue'. Consider updating the comment to avoid confusion.
// When toType is object and value is OnPlatform<T>, we need to return the wrapped value from IWrappedView | |
// When toType is object and value is OnPlatform<T>, we need to return the wrapped value from IWrappedValue |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
/azp run MAUI-UITests-public |
Azure Pipelines successfully started running 1 pipeline(s). |
public void ShouldDisplayHeaderBasedOnOnPlatform() | ||
{ | ||
App.WaitForElement("CollectionView"); | ||
VerifyScreenshot(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue Details
When setting OnPlatform for the Header property in the CollectionView, the exact value of the Header property is not displayed.
Root Cause
When OnPlatform is set for the Header property in the CollectionView, the exact T value is not retrieved from the ApplyPropertiesVisitors.
Description of Changes
Retrieve the actual value from the IWrappedValue of the wrapped value, and return it instead of the OnPlatform type itself.
Fixes #25124
Validated the behaviour in the following platforms
Output images:
Android
iOS
macOS
Windows