如何使用C#在WPF中对画布进行分组和取消分组? [英] How to group and un-group canvas in WPF using C# ?

查看:94
本文介绍了如何使用C#在WPF中对画布进行分组和取消分组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

而不是使用Expression Blend,如何以编程方式对画布进行分组或取消分组?



我尝试过:



i没有得到任何结果

Instead of using Expression Blend, how to group or un-group canvas programatically?

What I have tried:

i am not getting any refeerence

推荐答案

只需创建一个父Canvas对象,并添加所需的Canvas控件作为子对象新的父控件。通过使用Canvas作为父级,您可以轻松地将子项放置在父级中的任何位置。
Simply create a parent Canvas object, and add the desired Canvas controls as children of the new parent control. By using a Canvas as a parent, you retain the ability to easily position the children anywhere you want within the parent.


这篇关于如何使用C#在WPF中对画布进行分组和取消分组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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