xamarin.forms - Xamarin Froms 和 SkiaSharp,突出显示图像上的区域
问题描述
我使用下面的代码在 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>
现在我需要使用 SkiaSharp 突出显示图像中的一个区域。我可以使用SKCanvasView
. 但我想在图像上绘制。
我想使用 useAbsoluteLayout
但由于我的页面是 a ContentPage
,我无法使用AbsoluteLayout
内容的外部。
如果可以使用 ,我可以在后面的代码AbsoluteLayout
中动态定位它。C#
解决方案
推荐阅读
- python - Python 脚本适用于 vscode 但不适用于 rstudio
- python - 如何在新数据上更新时间序列模型(例如 facebook_prophet),而无需每次都重新训练数据?
- c++ - 如何使用 DirectShow 检测 PAL 或 NTSC 信号的存在?
- android - 颤振中的错误:任务':better_player:compileDebugJavaWithJavac'的执行失败
- c# - Adding custom Reference to Asp.Net project and CHTML page does not see it
- python - 使用 selfassertAlmostEqual 进行单元测试时出错
- swift - 如何根据 Swift 中的范围将整数转换为枚举?
- c# - ASP.NET Identity - 获取保存的第三方访问令牌
- azure - 无法在 Azure 数据工厂的复制活动中向接收器“Azure 数据资源管理器”添加其他列
- python - 如何使用函数从字符串中提取第一个、第二个和最后一个单词?