본문 바로가기
.NET WPF

실버라이트 영역 브라우저 크기에 따라 동적변경 초간단 팁

by 태디 2007. 9. 16.
728x90
1.TestPage.html

<head>
    <title>Silverlight Project Test Page </title>
   
    <script type="text/javascript" src="Silverlight.js"></script>
    <script type="text/javascript" src="TestPage.html.js"></script>
    <style type="text/css">
        .silverlightHost { width: 640px; height: 480px; }
    </style>
</head>

<body>
    <div id="SilverlightControlHost" class="silverlightHost" >
        <script type="text/javascript">
            createSilverlight();
        </script>
    </div>
</body>


2. Page.xaml

<Canvas x:Name="parentCanvas"
        xmlns="http://schemas.microsoft.com/client/2007"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Loaded="Page_Loaded"
        x:Class="PhotoBlog.PhotoBlog;assembly=ClientBin/PhotoBlog.dll"
        Width="640"
        Height="480"
        Background="White"
        >

</Canvas>

 

댓글