top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

how to use canvas in XAML give some coding sample??

+1 vote
55 views
how to use canvas in XAML give some coding sample??
posted Nov 21, 2014 by Saravanan

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

XAML CODE for CANVAS CONTROL

 <Grid>

    <TextBlock TextWrapping="Wrap" FontSize="30" Text="Canvas Sample" VerticalAlignment="Top"  
      HorizontalAlignment="Center" Margin="136,137,10,0" Width="334"/>

      <Canvas Margin="104,273,54,238">
        <Rectangle Fill="Red"/>
        <Rectangle Fill="Orange" Canvas.Left="20" Height="100" Width="100" Canvas.Top="20"/>
        <Rectangle Fill="White" Canvas.Left="40" Height="100" Width="100" Canvas.Top="40"/>
        <Rectangle Fill="Green" Canvas.Left="60" Height="100" Width="100" Canvas.Top="60"/>
    </Canvas>

</Grid>

OUTPUT:

enter image description here

answer Nov 24, 2014 by Jdk
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...