- Back to Home »
- WPF »
- XAML canvas control
Posted by :
Sudhir Chekuri
Thursday, 3 October 2013
Canvas
Canvas is a control that can have children but their position is absolute.It is not having flow layout and it is the least flexible layout control.
Generally we use canvas in games and the special feature of this is z control.
xaml code of canvas with three shapes inside it is as follow
<Canvas>
<Rectangle Fill="Red" Width="100" Height="100"></Rectangle>
<Ellipse Fill="Blue" Width="100" Height="100"></Ellipse>
<Polygon Fill="Green" Width="100" Height="100" Points="0,0 275,0 275,200"></Polygon>
</Canvas>
windows store apps development c# canvas example output |