<Canvas> : 루트 레이아웃


- Silverlight의 최상위 레이아웃(1.0)
      - 실버라이트의 전체 영역을 지정
      - 직접 좌표값을 지정하는 방식




-------------------------------------------------------------------------------------

 

[MainPage.xaml]

<UserControl x:Class="RiaCanvas.MainPage"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

    mc:Ignorable="d"

    d:DesignHeight="300" d:DesignWidth="400">

    <!--<Canvas x:Name="redCanvas" Background="Red" Width="100" Height="100" Canvas.ZIndex="99">

        <Canvas x:Name="greenCanvas" Background="Green"

                Width="100" Height="100" Canvas.Left="20" Canvas.Top="20" Canvas.ZIndex="2">

            <Canvas x:Name="blueCanvas" Background="Blue" Width="100" Height="100" Canvas.ZIndex="0"

                    Canvas.Left="20" Canvas.Top="20">               

            </Canvas>

        </Canvas>

    </Canvas>-->

 

    <Canvas x:Name="redCanvas" Background="Red" Width="100" Height="100" Canvas.ZIndex="99">

        <Canvas x:Name="greenCanvas" Background="Green"

             Canvas.ZIndex="2"

                Width="100" Height="100" Canvas.Left="20" Canvas.Top="20">           

        </Canvas>

        <Canvas x:Name="blueCanvas" Background="Blue" Width="100" Height="100"

                Canvas.ZIndex="1"

                    Canvas.Left="40" Canvas.Top="40">           

        </Canvas>

    </Canvas>

</UserControl>

 

 


-------------------------------------------------------------------------------------

 


[실행결과]







Posted by holland14
: