1 TabItem tabItem = sender as TabItem; 2 tabItem.Background = new ImageBrush(new BitmapImage(new Uri(@"../../Interface/sidebar/main/m-scan-h.png", UriKind.Relative)));//特别注意这里使用的相对路径的方式
WPF中用后台C#代码为TabItem设置Background属性
原文:http://www.cnblogs.com/tommy-huang/p/4960557.html