WPF中用后台C#代码为TabItem设置Background属性

时间:2015-11-12 23:15:19   收藏:0   阅读:607
技术分享
1 TabItem tabItem = sender as TabItem;
2             tabItem.Background = new ImageBrush(new BitmapImage(new Uri(@"../../Interface/sidebar/main/m-scan-h.png", UriKind.Relative)));//特别注意这里使用的相对路径的方式
View Code

 

原文:http://www.cnblogs.com/tommy-huang/p/4960557.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!