如何在wpf的Rectangle中添加stackPanel? [英] how to add stackPanel in Rectangle in wpf ?

查看:103
本文介绍了如何在wpf的Rectangle中添加stackPanel?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Wpf中的Rectangle中添加stackPanel或其他工具?

how to add stackPanel or other tools in Rectangle in wpf ?

推荐答案

矩形 Shape ,它不是 Panel ,也没有实现 IAddChild ,这不是为了添加其他控件。



如果你想要添加东西的效果矩形尝试替换矩形与(例如) Border 的样式与 Rectangle <相同/ code>。



希望这会有所帮助,

Fredrik
A Rectangle is a Shape, it's not a Panel nor does it implement IAddChild, it's not for adding other controls to.

If you want the effect of adding things to a Rectangle try replacing the Rectangle with (for example) a Border styled to look the same as your Rectangle.

Hope this helps,
Fredrik


这篇关于如何在wpf的Rectangle中添加stackPanel?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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