Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
how to add stackPanel or other tools in Rectangle in wpf ?
Posted

1 solution

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
 
Share this answer
 
Comments
Madhuri Gamane 12-Sep-14 8:31am    
yeah it works.. thanx :-)
Fredrik Bornander 12-Sep-14 8:42am    
Glad I could help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900