Xamarin Form projects crashes at runtime if I add a skiacanvas object to detail view

CarmenBranjeCarmenBranje CAMember ✭✭
edited September 21 in SkiaSharp

I have a forms project with a master-detail setup.

If I try and put a SKCanvasView object into the detail view, I get a run time error. This happens if I do it in xaml file or if I do it in C#.

<?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:skia="clr-namespace:SkiaSharp.Views.Forms;assembly=SkiaSharp.Views.Forms"
             xmlns:telerikPrimitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives"
             x:Class="Compas_Mobile.MasterDetailPage1Detail"
             Title="Pulse Page">


    //adding this line causes a crash
    <skia:SKCanvasView x:Name="canvasView" PaintSurface="CanvasView_PaintSurface"></skia:SKCanvasView>

</ContentPage>

Posts

  • mattleibowmattleibow ZAXamarin Team Xamurai

    What is the error? My main sample for SkiaSharp is a master-detail, with the canvas in the detail - so this should work.

Sign In or Register to comment.