开发者

Using Canvas in Windows Form .net application

I want to create a Winform application which displays Datagrid, Charts on it. My requirement is, that the user should be able to position those elements according to his choice, like we drop text box, label in winform design view. I know that there is a Canvas class in WPF, but I want to achieve the same with Winforms.

Can I use the WPF开发者_JS百科 Canvas in Winform? Or is there any other solution?


You can use a WPF Canvas in a Windows Forms application. Just place the Canvas inside of an ElementHost control.


I came across this code while searching for an answer, it comes from a Stephens' VB trainer example:

Dim canvas As New Bitmap(
        picCanvas.ClientSize.Width,
        picCanvas.ClientSize.Height)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜