Button TempButton = new Button();

                      
                        TempButton.Tag = “按钮标记”;
                        TempButton.Height = 30;
                        TempButton.Width = 100;
                        TempButton.Style = this.FindResource("ButtonStyle_blue") as Style;
                                   
                         //颜色
                        TempButton.Background = new SolidColorBrush(Colors.Black);//背景色
                        TempButton.Foreground = new SolidColorBrush(Color.FromArgb(0xff, 0x6e, 0x6e, 0x6e));//前景色(字体颜色)
                        
                        //字体
                        TempButton.FontFamily = new FontFamily("Microsoft YaHei");
                        TempButton.FontSize = 13;
                        TempButton.FontWeight = FontWeights.Normal; 
                         
                         //布局
                        TempButton.Margin = new Thickness(0);      
                        TempButton.VerticalAlignment = VerticalAlignment.Center;
                        TempButton.HorizontalAlignment = HorizontalAlignment.Right;  
                        
                         //URL
                        (TempButton.Background as ImageBrush).ImageSource = new BitmapImage(new Uri(“图片路径”), UriKind.Absolute));
 
                        Wrappanel.Children.Add(TempButton);

最新文章

  1. 【Win10 应用开发】自定义应用标题栏
  2. BZOJ 2882: 工艺
  3. Bootstrap学习笔记系列3-------Bootstrap简单表单显示
  4. javascript 之Object内置对象
  5. paper 107:图像的白平衡
  6. BCB中获得RichEdit 默认行间距
  7. iOS 延迟执行
  8. VR应用里面的Photogrammetry技术是什么
  9. 《C和指针》章节后编程练习解答参考——第9章
  10. Map(关联式容器)
  11. CODE[VS]-保留两位小数-浮点数处理-天梯青铜
  12. C#读取Excel的其中一种方式OleDb读取(100万条)--快速大量插入SQL中
  13. loading.io一个可以直接生成loading gif图标的站点
  14. Elixir游戏服设计一
  15. python项目推荐(转载知乎)
  16. 【接口时序】5、QSPI Flash的原理与QSPI时序的Verilog实现
  17. Linux下Clamav 杀毒软件安装使用文档
  18. python 遍历list并删除部分元素
  19. java及spark2.X连接mongodb3.X单机或集群的方法(带认证及不带认证)
  20. px em rem 区别

热门文章

  1. C++ 洛谷 P2657 [SCOI2009]windy数 题解
  2. 关于pcl索引的使用
  3. 解析Unicode转义序列带来的问题
  4. Java 7 源码学习系列(一)——String
  5. RestTemplate真实案例
  6. ~~Py2&Py3~~
  7. MyBatis从入门到精通:第一章测试代码
  8. 重新认识 async/await 语法糖
  9. ‎Cocos2d-x 3.x 学习笔记(三):Scheduler Timer 调度与定时
  10. Day1 -Python program