Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Xamarin.Forms : CommandParameter no longer working on buttons in a listview (MVVM + Prism) #9238

Closed
chenaimt opened this issue Jan 17, 2020 · 3 comments
Labels
i/regression s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. s/unverified New report that has yet to be verified t/bug 🐛

Comments

@chenaimt
Copy link

I have a project with various types of pages that contain listviews with labels and buttons inside a data template. The list views have been populating correctly all along untill my last Xamarin.Forms upgrade to version 4.4.0.991477. Now when the pages load the listviews are empty but if you hover over them you see the rows have been created - they are just blank. If i remove the CommandParameter from the buttons that are in the list view, the lists will populate correctly and triggers the command in the ViewModel however no parameter is passed when you click the buttons (obviously coz the CommandParameter has been removed). In addition, if you select the row, the event is triggered correctly with the correct data. i have tried all methods of including the CommandParameter but each of them make the lists populate empty rows. The code has been working all along till the upgrade

Steps to Reproduce

  1. Include the CommandParameter binding on a button in a datatemplate (list view). Run the code
  2. Include the CommandParameter binding on a button in a datatemplate (list view). Run the code

Expected Behavior

The listviews should populate with all controls including buttons. The buttons should also work accordingly when clicked

Actual Behavior

The listviews are created with empty rows. If you hover over with a mouse you will see the rows that have been created but at first sight it just looks like an empty page

Basic Information

The code has been working till the update

  • Version with issue: 4.4.0.991477
  • Last known good version: Most likey 4.1.0.618606
  • IDE: Visual Studio 2019
  • Platform Target Frameworks: .Net Standard 2.0
    • iOS: NA
    • Android: NA
    • UWP: Windows 10 version 1809, Build 17763
  • Android Support Library Version: NA
  • Nuget Packages: Many including Sqlite, Prism, XamarinForms, .Net, Flurl, etc
  • Affected Devices: All

Screenshots

image

Reproduction Link

Workaround

I am going to try to roll back Xamarin.Forms

@chenaimt chenaimt added s/unverified New report that has yet to be verified t/bug 🐛 labels Jan 17, 2020
@chenaimt chenaimt changed the title CommandParameter no longer working on button in listview on MVVM Xamarin.Forms : CommandParameter no longer working on buttons in a listview (MVVM + Prism) Jan 17, 2020
@chenaimt
Copy link
Author

Rolled back my Xamarin.Forms and my listviews now display the data correctly
image

@StephaneDelcroix StephaneDelcroix added 3.5.0 regression on 3.5.0 s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. i/regression and removed 3.5.0 regression on 3.5.0 labels Jan 17, 2020
@StephaneDelcroix
Copy link
Member

could you please provide a reproduction project ? thanks

@PureWeen
Copy link
Contributor

This is a duplicate of
#8918

It's interesting because if you just use our command and not prisms everything works fine but it's definitely a regression

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i/regression s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. s/unverified New report that has yet to be verified t/bug 🐛
Projects
None yet
Development

No branches or pull requests

3 participants