Hello,
With the code you provided, I noticed that you are trying to do data binding for orientation. Orientation="{Binding Source={x:Reference AView}, Path=AOrientation, Mode=OneWay}" Span="{Binding Source={x:Reference AView}, Path=ASpan, Mode=OneWay}"
.
This is because Orientation
is not a bindable property, and you could refer to the solution proposed by the maui developers Can not bind Orientation in LinearItemsLayout #4628.
This is as-designed. The Orientation of the ItemsLayout is not a BindableProperty. If you want to use a binding to set/update the orientation of a CollectionView at runtime, you have to bind the entire ItemsLayout. Something like:
<CollectionView ItemsLayout="{Binding ItemsLayout}">
And set ItemsLayout in your view model to whatever layout you want.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.