今日问题汇总-WPF中更改Image控件的source、WPF 去掉窗体边框
2015-09-15 20:39
591 查看
1.Image控件的Source属性不知道后台怎么赋值
解决:
WPF中更改Image控件的source(使用相对路径)
博客地址:http://blog.csdn.net/cdjcong/article/details/8491292
绝对路径:
BitmapImageimagetemp = new BitmapImage(new Uri("E:\\Work\\Demo2.bmp",UriKind.Absolute));
image1.Source= imagetemp;
相对路径:
BitmapImageimagetemp = new BitmapImage(newUri("\\bin\\Debug\\Sources\\ON_btn_AutoDetect.bmp",UriKind.Relative));
image1.Source= imagetemp;
2.WPF去掉窗体边框
解决:
设置 WindowStyle="None"、 AllowsTransparency="True"
即可。如下:
解决:
WPF中更改Image控件的source(使用相对路径)
博客地址:http://blog.csdn.net/cdjcong/article/details/8491292
绝对路径:
BitmapImageimagetemp = new BitmapImage(new Uri("E:\\Work\\Demo2.bmp",UriKind.Absolute));
image1.Source= imagetemp;
相对路径:
BitmapImageimagetemp = new BitmapImage(newUri("\\bin\\Debug\\Sources\\ON_btn_AutoDetect.bmp",UriKind.Relative));
image1.Source= imagetemp;
2.WPF去掉窗体边框
解决:
WPF 去掉窗体边框
链接地址:http://blog.sina.com.cn/s/blog_8600e72b0101exxn.html设置 WindowStyle="None"、 AllowsTransparency="True"
即可。如下:
Window x:Class="WpfApplication1.MainWindow" · xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" · xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" · Title="MainWindow" Height="350" Width="525" · WindowStyle="None" · AllowsTransparency="True"> · <Grid> · </Grid> · </Window>
相关文章推荐
- Java集合框架特点简单总结
- hdu 1754
- linux中软件包管理工具rpm和yum
- 分层图,bzoj2763: [JLOI2011]飞行路线
- Ubuntu 14.04 为 root 帐号开启 SSH 登录【转载的哟】
- 深入理解Java:注解(Annotation)自定义注解入门
- 2015网赛1-The Water Problem-5443
- SAP AFS 6.4新增功能介绍
- Objective-C 【NSPoint&CGPoint-NSSize&CGSize-NSRect&NSRect】
- Qt 学习之路 :Repeater
- STM32L0 复位和时钟控制 Reset and clock control (RCC)
- 算法导论第四章分治策略剖根问底(二)
- sqlite3数据库基础语句
- iOS软件开发 设置cell动画效果
- UVA10038 - Jolly Jumpers
- 不为繁华易匠心
- Android开发
- jsp九大内置对象
- 第3周实践项目2--建设“顺序表”算法库
- 2015长春网络赛(HDU5437,5438,5439,5441,5442,5443,5444,5446)