skiasharp's Paintsurface未调用

发布于 2025-02-11 03:11:21 字数 541 浏览 1 评论 0原文

在开始问题之前,我想告诉我我是Xamarin的新手...

我想了解我在项目中需要实现/添加/添加的内容,以获取

private> private void canvasview_paintsurface (对象发件人,skpaintsurfaceeventargs e)

被拨打:

public ColorDemo()
{
    // some code suppressed here, but not related to the question

    SKCanvasView canvasView = new SKCanvasView();

    canvasView.PaintSurface += canvasView_PaintSurface;
    canvasView.InvalidateSurface();
}

解决方案(Visual Studio 2022)在我的智能手机和/或模拟器中运行正常,但事件处理程序从未被调用。我尝试了很多事情,但没有成功。我想了解事件处理程序从未被召唤的原因。

Before to start the question, I would like to inform that I am completely newbie to Xamarin...

I would like to understand what I need implement/add/edit in my solution in my project in order to get

private void canvasView_PaintSurface(object sender, SKPaintSurfaceEventArgs e)

being called by:

public ColorDemo()
{
    // some code suppressed here, but not related to the question

    SKCanvasView canvasView = new SKCanvasView();

    canvasView.PaintSurface += canvasView_PaintSurface;
    canvasView.InvalidateSurface();
}

The solution (Visual Studio 2022) runs ok in my smartphone and/or emulator but the event handler is never called. I tried many things, but no success. I would like to understand the reason why the event handler is never called.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文