[FrmCanvasSize.xaml]




<UserControl x:Class="RiaCanvasClip.FrmCanvasSize"

    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 Width="100" Height="100" Background="Blue">

        <Ellipse Width="200" Height="400" Fill="red"></Ellipse>

    </Canvas>

 

</UserControl>

 

 








[웹 페이지에서의 실행결과]

--> 웹 페이지에서 전체화면에 실버라이트 영역이 적용되어있는 화면.








[RiaCanvasClipTestPage.aspx]코드 수정


<%@ Page Language="C#" AutoEventWireup="true" %>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

    <title>RiaCanvasClip</title>

    <style type="text/css">

    html, body {

                      height: 100%;

                      overflow: auto;

    }

    body {

                      padding: 0;

                      margin: 0;

    }

    #silverlightControlHost {

                      height: 300px;

                      width: 400px;

                      text-align:center;

    }

    </style>

 






[RiaCanvasClipTestPage.aspx]코드 수정 후 웹페이지에서 실행 결과

--> 웹페이지에서 선택한 영역만큼만 실버라이트 영역을 주었다.











Posted by holland14
: