XAML

Integrate Plugin in ContentPage

You need to specify a new xmlns:crossapps namespace and then add the control in any layout.

You can insert code snippets in any markdown file by using standard code fences syntax ie:

<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" 
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
             xmlns:local="clr-namespace:PhotoTaker" 
             xmlns:crossapps="clr-namespace:CrossAppsPhotoPlugin;assembly=CrossAppsPhotoPlugin"
             xmlns:effects="clr-namespace:CrossAppsPhotoPlugin.Effects;assembly=CrossAppsPhotoPlugin"
             Title="MainPage"
             x:Class="PhotoTaker.MainPage">
    <ContentPage.Effects>
        <effects:OrientationEffect />
    </ContentPage.Effects>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <crossapps:PhotoTakerView x:Name="photoTakerView" Grid.Row="0" CloseButtonVisible="true"
                                  HorizontalOptions="FillAndExpand" MaxImageCount="6" 
                                  VerticalOptions="FillAndExpand"/>
    </Grid>
</ContentPage>

Register File Saved Event

The following code highlighting options are configured in the config.toml

photoTakerView.FilesSaved += PhotoTakerView_FilesSaved;

void PhotoTakerView_FilesSaved(object sender, EventArgs e)
{
    var files = photoTakerView.FileNames;
    foreach (var file in files)
    {
        // handle files
    }
}