SKCanvasView Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A view that can be drawn on using SkiaSharp drawing commands.
[Xamarin.Forms.RenderWith(typeof(SkiaSharp.Views.Forms.SKCanvasViewRenderer))]
public class SKCanvasView : Xamarin.Forms.View, SkiaSharp.Views.Forms.ISKCanvasViewController
- Inheritance
-
SKCanvasView
- Attributes
- Implements
Constructors
SKCanvasView() |
Creates a new instance of the SKCanvasView view. |
Fields
EnableTouchEventsProperty |
Implements the EnableTouchEvents property, and allows the SKCanvasView class to bind it to properties on other objects at run time. |
IgnorePixelScalingProperty |
Implements the IgnorePixelScaling property, and allows the SKCanvasView class to bind it to properties on other objects at run time. |
Properties
CanvasSize |
Gets the current canvas size. |
EnableTouchEvents |
Gets or sets a value indicating whether or not to enable touch events for this view. |
IgnorePixelScaling |
Gets or sets a value indicating whether the drawing canvas should be resized on high resolution displays. |
Methods
InvalidateSurface() |
Informs the canvas that it needs to redraw itself. |
OnMeasure(Double, Double) |
Method that is called when a layout measurement happens. |
OnPaintSurface(SKPaintSurfaceEventArgs) |
Implement this to draw on the canvas. |
OnTouch(SKTouchEventArgs) |
Implement this to handle touch events on the canvas. |
Events
PaintSurface |
Occurs when the the canvas needs to be redrawn. |
Touch |
Occurs when the the canvas received a touch event. |
Explicit Interface Implementations
ISKCanvasViewController.GetCanvasSize |
The event that is raised when the Xamarin.Forms view requests the size of the current SkiaSharp surface. |
ISKCanvasViewController.OnPaintSurface(SKPaintSurfaceEventArgs) | |
ISKCanvasViewController.OnTouch(SKTouchEventArgs) | |
ISKCanvasViewController.SurfaceInvalidated |
The event that is raised when the Xamarin.Forms view requests the native view be repainted. |
Applies to
SkiaSharp
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기