在inkcanvas中绘制基本形状 [英] Drawing basic shapes in inkcanvas

查看:276
本文介绍了在inkcanvas中绘制基本形状的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何在inkcanvas上绘制圆形,矩形等基本形状?我尝试过SimpleInk sample.but它只提供手绘图。

How can we draw basic shapes like circle,rectangle etc on inkcanvas? I tried SimpleInk sample.but it provides only hand drawing.

有没有办法拖放形状并调整它的大小,就像涂油漆一样?

Is there any way to drag and drop shapes and adjust it's size like in Ms paint?

推荐答案

Hello Susan,

Hello Susan,

基本上,inkcanvas存储笔画,因此调整大小并不容易编码(说实话,我有不知道如何根据拖放修改此演示。如果你需要像Ms paint这样的形状,你需要使用其他控件而不是inkcanvas。例如,
创建带边框的自定义控件。

Basically the inkcanvas stores strokes so the resize is not that easy for coding(To be honest, I have no idea how to modify this stoke based on drag and drop). If you need a shape like Ms paint, you need to use other controls instead of inkcanvas. For example, create customize control with border.

无论如何,如果你只是指基本形状。您可以将画布覆盖在您的墨迹上,或者执行类似官方示例的操作  复杂墨迹示例 其中
还提供"按插入形状"以在现有墨水上插入随机几何形状。墨水可以在现有形状之上交错。"

Anyway, if you just mean basic shapes. You can either put a canvas overlay your inkcanvas or do something like the official sample Complex inking sample which also provide "Press Insert Shape to insert random geometric shape on top of existing ink. Ink can interleave on top of existing shapes."

最好的问候,

Barry


这篇关于在inkcanvas中绘制基本形状的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆