Silverlight自定义加载

由于加载的xaml 必须和Silverlight application不能放在一起

在web host上添加新建项xaml

image

image

Scen1代码:

<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <StackPanel VerticalAlignment="Center">
    <Grid>
      <Rectangle x:Name="progressBarBackground" Fill="White" Stroke="Black"
       StrokeThickness="1" Height="30" Width="200"></Rectangle>
      <Rectangle x:Name="progressBar" Fill="Yellow" Height="28" Width="0">
      </Rectangle>
    </Grid>
    <TextBlock x:Name="progressText" HorizontalAlignment="Center"
     Text="0% downloaded ..."></TextBlock>
  </StackPanel>
</Grid>

object参数:

image

添加js:

image

运行效果:

image 

 

posted @ 2009-12-21 20:38  3.mu  阅读(149)  评论(0编辑  收藏  举报