CanvasSize - 실버라이트 적용할 영역 사이즈 조정하기
.NET프로그래밍/Silverlight 3.0 2009. 12. 1. 09:21 |[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]코드 수정 후 웹페이지에서 실행 결과
--> 웹페이지에서 선택한 영역만큼만 실버라이트 영역을 주었다.
'.NET프로그래밍 > Silverlight 3.0' 카테고리의 다른 글
Button컨트롤 (0) | 2009.12.01 |
---|---|
CanvasClip - Canvas영역에서 일부분만 잘라내어 보여주기 (0) | 2009.12.01 |
Canvas.ZIndex (사각형(도형) 포개는 순서 바꾸기) (0) | 2009.12.01 |
Canvas.Left와 Canvas.Top (0) | 2009.12.01 |
Perspective 3D (0) | 2009.11.27 |