You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] CameraView StopCameraPreviewCommand is not working #3156
The CameraView.StopCameraPreviewCommand is not working correctly. When binding this command to a button, the app raises the following exception:
System.InvalidCastException: 'Unable to cast object of type 'Microsoft.Maui.Controls.Command' to type 'Microsoft.Maui.Controls.Command`1[System.Threading.CancellationToken]'.'
Expected Behavior
The StopCameraPreviewCommand should work as expected.
@ne0rrmatrix I've tested your branch locally. Opening the CameraView page does not throw the InvalidCastException anymore. However, the "Stop Camera Preview" button still does not work as expected.
I've opened a PR #3158 which I believe should fix this issue properly. I've tested locally and the command is working as expected. Would you be able to take a look?
Activity
ne0rrmatrix commentedon Mar 17, 2026
@zhitaop please test #3157 and report back if that fixes your issue.
zhitaop commentedon Mar 17, 2026
@ne0rrmatrix I've tested your branch locally. Opening the CameraView page does not throw the
InvalidCastExceptionanymore. However, the "Stop Camera Preview" button still does not work as expected.I've opened a PR #3158 which I believe should fix this issue properly. I've tested locally and the command is working as expected. Would you be able to take a look?