[英]C# and WPF : simple 2D area for basic drawing
Using JavaFX, I created a class which inherits Canvas
and reimplemented the update()
method to get a GraphicsContext2D
, with which I could use simple drawing primitives like strokeLine()
, fillArc()
, fillOval()
, etc.
使用 WPF 在 C# 中的等價物是什么?
在 wpf 中還有 Canvas 可以從中繼承和實現添加邏輯。 wpf 也有 InkCanvas 和一些你也可以擴展的默認實現。 以 InkCanvas 為例,查看https://github.com/antfu/live-draw 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.