这是我的XAML
<Image Name="StatusImage" Source="/Foo.Bar.Sam;component/Images/YellowDot.png" Stretch="Fill" MaxWidth="12" MaxHeight="12">
使用VB或C#,如何将Image
更改为RedDot或GreenDot?
答案 0 :(得分:2)
string strUri2 = String.Format(@"pack://application:,,,/MyAseemby;component/resources/main titles/{0}", CurrenSelection.TitleImage);
imgTitle.Source = new BitmapImage(new Uri(strUri2));