Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samafshari/RedCorners.Forms.CameraView
CameraView for Xamarin.Forms; a wrapper for RedCorners.Forms.ZXing with a nicer name
https://github.com/samafshari/RedCorners.Forms.CameraView
Last synced: 29 days ago
JSON representation
CameraView for Xamarin.Forms; a wrapper for RedCorners.Forms.ZXing with a nicer name
- Host: GitHub
- URL: https://github.com/samafshari/RedCorners.Forms.CameraView
- Owner: samafshari
- License: mit
- Created: 2020-05-20T17:26:59.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T10:29:18.000Z (about 2 years ago)
- Last Synced: 2024-08-03T23:24:08.364Z (4 months ago)
- Language: C#
- Size: 451 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
- awesome-xamarin-forms - RedCorners.Forms.CameraView ★3
README
# RedCorners.Forms.CameraView
A CameraView for Xamarin.Forms (iOS and Android only), based on ZXing.Net by Redth.
To include the namespace in your XAML:
```
xmlns:rfc="clr-namespace:RedCorners.Forms;assembly=RedCorners.Forms.CameraView"
```Then simply use it:
```
```
To take a photo:
```
await cameraView.CapturePhotoAsync(path);
```Permissions are handled by Xamarin.Essentials on first use. You have to set up Xamarin.Essentials permissions in your projects.
# Example
```
```
```
public MainPage()
{
InitializeComponent();titleView.BackCommand = new Command(() =>
{
previewImage.Source = null;
titleView.HasButton = false;
});
}private async void Button_Clicked(object sender, EventArgs e)
{
var path = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"photo.jpg");await cameraView.CapturePhotoAsync(path);
previewImage.Source = path;
titleView.HasButton = true;
}
```