首页 > 其他 > 详细

WPF中常用控件的属性

时间:2014-08-29 23:59:18      阅读:660      评论:0      收藏:0      [点我收藏+]

Source = new BitmapImage( new Uri( WangCaiConfig.GetCurrentDirectory() + imgStr, UriKind.RelativeOrAbsolute))
  this.PictureImage.Source = new BitmapImage( new Uri(img, UriKind.RelativeOrAbsolute));


  Canvas.Right="10": Canvas.SetRight(stateImage, 0);
  Canvas.Bottom="0" : Canvas.SetBottom(stateImage, 0);

  :  Margin = new Thickness(20, 0, 0, 0),
    Padding="5,0,0,0":   Padding = new Thickness(5, 0, 0, 0),

       Foreground ="#333":  Foreground = new SolidColorBrush((Color )ColorConverter .ConvertFromString("#333"))
  Style = (System.Windows.Style)FindResource( "FriendPhoneStyle"),
   
 canvas.Background = Brushes.White;
      Background = new SolidColorBrush((Color )ColorConverter .ConvertFromString("#fff")),
//获取文件夹的路径,放进数组中
                    path = WangCaiConfig.GetCurrentDirectory() + "RecommendPictures" ;
                    dirs = Directory.GetFiles(path);
IsNullOrWhiteSpace(不为空)


HorizontalAlignment = HorizontalAlignment.Stretch,


  this.RegisterName( "LXR_List" + user.Id, canVasRoot_button);注册事件 

设置位置
 Canvas.SetRight(canVasRoot_button_canvas_image_2, 0);
  Canvas.SetBottom(canVasRoot_button_canvas_image_2, 0);

取下一级控件
      var button = canva.Children[1] as Button;

WPF中常用控件的属性

原文:http://www.cnblogs.com/xiaoyaodijun/p/3945879.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!