siverlight简单知识点


一:为grid设置背景图片

   <Grid x:Name="LayoutRoot" Width="900" Height="600">
        <Grid.Background>
            <ImageBrush ImageSource="Image/game-ddz_bg.png" Stretch="Fill"></ImageBrush>
        </Grid.Background>

    </Grid>


二:后台设置控件的margin

   image.Margin = new Thickness(0, 90, 0, 0);


三:后台添加图片子控件

      ImageSource imageSource = new BitmapImage(new Uri("Image/faceDown.png", UriKind.RelativeOrAbsolute));
      image.Source = imageSource;
       _sp.Children.Add(image);


四:后台为grid设置背景图片

            LayoutRoot.Background = new ImageBrush() { Stretch = Stretch.Fill, ImageSource =  new BitmapImage(new Uri("Image/game-ddz_bg.png", UriKind.RelativeOrAbsolute)) };

五:后台设置颜色

      tb.Foreground = new SolidColorBrush(Colors.Red);

      tb.Background = new SolidColorBrush(Color.FromArgb(0xff, 0x5e, 0x83, 0xad));颜色是16进制的数如果用的是红绿蓝的前边一个就写0xff


六:分层思想主页面去引用其他的siverlight库文件编译成的dll

     

七:On time task

        use DispatcherTimer



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值