This is a repost from 2009. It talks about breast cancer, but applies equally well to Covid testing, given the high percentage of false positives (not to mention the more worrisome false negatives). We simply are not wired well for probability…
1% of women at age forty who participate in routine screening have breast cancer. 80% of women with breast cancer will get positive mammographies. 9.6% of women without breast cancer will also get positive mammographies.
Suppose you have a collection of items and you want to display them in a ListView (Xamarin.Forms). The catch is that you want to change the display of each item depending on its state or some other code-based attributes.
At first glance this would seem very difficult, and you’d have to modify the instances in the collection to do so. This is where the DataTemplateSelector comes in.
In short, you create two or more data templates — one for each way you might want to display one of the items in your collection — and then you tell Xamarin.Forms, by way of the DataTemplateSelector, which data template to use.
Quite often we want to send an alert from the view model, but you can only do so from the view. We’ve tackled this problem in the past but we think there is room for a simplified and clear step by step explanation.