вообще все странно! Обычный сильверлайт проект из Visual Studio работает нормально, а вот это например не отображается в firefox, а в опере и експлорере отображается только бэкграунд который задан в джава скриптеб а Canvas и прямоугольник - не отображаются!!
| Код | <html> <head> <script type="text/javascript" src="Silverlight.js"></script> <script type="text/javascript"> function loadTriger(control, userContext, rootElement) { alert('asdf'); } function createSilverlight() { Silverlight.createObject( "Site.xaml", document.getElementById("silverDiv"), "Siverlight1", { width:'500', heigth:'500', inplaceInstallPrompt:false, background:'Black', isWindowsless:'false', framerate:'24', version:'2.0' }, { onError:null, onLoad:loadTriger }, null); } </script> </head> <body> <div id="silverDiv"> <script type="text/javascript"> createSilverlight()
</script> </div> </body> </html>
|
| Код |
<UserControl x:Class="experiments.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="500" Height="500">
<Canvas Height="500" Width="500" Background="White"> <Rectangle Height="100" Width="100"> <Rectangle.Fill> <SolidColorBrush Color="Red"></SolidColorBrush> </Rectangle.Fill> </Rectangle> </Rectangle>
</Canvas> </UserControl>
|
|