[Bug] UWP ListView, ItemTemplate with a Label.IsVisible bound to ".", property converter receives the wrong model
#8,827 opened on 2019/12/10
Repository metrics
- Stars
- (5,644 個のスター)
- PR merge metrics
- (30d に merged PR はありません)
説明
Description
I have a page that has a view model with an ObservableList of items, and a ListView that binds to that list. The ListView has an ItemTemplate with a number of labels, those labels bind to individual properties within the model, however one of the labels binds to IsVisible using the "." notation so that my property converter can evaluate several properties. This works fine on iOS and Android, but on UWP my converter is throwing an error as it isn't getting the item binding context, it is getting the ListView binding context instead!
Steps to Reproduce
- Create a page with a model that contains a list of other models, and a listview
- Bind the listview itemssource to the model list
- Add an ItemTemplate to the listview containing a label that binds to "." with a property converter
- Run on UWP
Expected Behavior
The app correctly provides the Items model to the label property converter
Actual Behavior
Crash On UWP as the property converter receives the page BindingContext instead of the item model
Basic Information
- Version with issue:
- Last known good version: Unknown
- Platform Target Frameworks:
- UWP: