-
Notifications
You must be signed in to change notification settings - Fork 494
Labels
bugSomething isn't workingSomething isn't working
Description
Is there an existing issue for this?
- I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
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.
Steps To Reproduce
- Run the CommunityToolkit.Maui.Sample app with the latest main branch on Windows (Note: might have to revert the commit 9aca2fc due to the issue [BUG] CommunityToolkit sample app crashes opening CameraView page on Windows #3155)
- Open the CameraView Page from the Views side menu
- Observe that the above exception is thrown
- Continue running the app. Observe that the "Stop Camera Preview" button does not work as expected.
Link to public reproduction project repository
https://github.com/CommunityToolkit/Maui/tree/main/samples
Environment
- .NET MAUI CommunityToolkit: v14.0.1
- .NET MAUI CommunityToolkit.Maui.Camera: v6.0.0
- OS: Windows 11 Enterprise
- .NET MAUI: 10.0.41Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working