MAUIverse MAUIverse
← Back to Toolkit Releases

Camera v6.1.0: `IsTorchOn`

Contributors

CommunityToolkit.Maui.Camera v6.1.0

Introducing IsTorchOn 🔦

Thanks to @MFinkBK, bool CameraView.IsTorchOn { get; set; } is now supported!

When IsTorchOn == true the device’s torch (aka flashlight) will turn on; when IsTorchOn == false the device’s torch (aka flashlight) will turn off.

https://learn.microsoft.com/dotnet/communitytoolkit/maui/views/camera-view

CameraViewPage.xaml.cs

<toolkit:CameraView
    x:Name="Camera"
    IsTorchOn="{Binding IsTorchOn, Mode=TwoWay}" />

CameraViewViewModel.cs

[ObservableProperty]
public partial bool IsTorchOn { get; set; }

What’s Changed

New Contributors

Full Changelog: https://github.com/CommunityToolkit/Maui/compare/14.1.1…6.1.0-camera

View on GitHub

← Back to Toolkit Releases