Cover | Table of Contents
<Canvas>, which defines the area
that holds the Silverlight content. will show
other uses for the <Canvas> element. For now,
just remember to put this element at the beginning of each XAML file and
supply the correct namespaces as follows:<Canvas xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
...
</Canvas> <Canvas xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextBlock>Silverlight</TextBlock>
</Canvas> TranslateTransform
ScaleTransform
SkewTransform
RotateTransform
MatrixTransform
function createSilverlight()
{
Silverlight.createObjectEx({
source: 'Info.xaml',
parentElement: document.getElementById('SilverlightPlugInHost'),
id: ‘SilverlightPlugIn',
properties: {
width: '400',
height: '300',
background:'#ffffffff',
isWindowless: 'false',
version: '1.0'
},
events: {
onError: null
}
});
}var plugin = document.getElementById('SilverlightPlugIn');<Canvas xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Loaded="loadFile”>
<Rectangle Width="300" Height="150" Stroke="Orange" StrokeThickness="15" />
<TextBlock x:Name="DownloadText" FontSize="52"
Canvas.Left="25" Canvas.Top="35" Foreground="Black"
Text="loading ..."/>
</Canvas> Return to Essential Silverlight PDF