I use the below code to show image on a from.
<ContentPage>
<ContentPage.Content>
<Grid>
// Row definitions here
// Column definitions here
<Image
Grid.Column="0"
Grid.Row="0"
x:Name="myStoryPage"
Grid.ColumnSpan="3">
</Image>
<!-- Next, previous buttons here -->
<skiaforms:SKCanvasView x:Name="canvasView"
PaintSurface="canvasView_PaintSurface"
Grid.Row="3"
Grid.Column="0"
Grid.ColumnSpan="3"
AbsoluteLayout.LayoutBounds="10, 0, 5, 65"/>
</Grid>
</ContentPage.Content>
</ContentPage>
Now I need to highlight an area in the image using SkiaSharp.
I could do drawing a line under the grid using the SKCanvasView
. But I want to draw over the image.
I thought to use use AbsoluteLayout
but as my page is a ContentPage
, I could not use the AbsoluteLayout
outside of the content.
If I could use AbsoluteLayout
, I can dynamically position it using C#
in code behind.