Wpf control.image中没有设置图片,uri为

Wpf control.image中没有设置图片,uri为,wpf,c#-4.0,uri,Wpf,C# 4.0,Uri,我的解决方案资源管理器映像: PopupInHelper中的我的代码: var img = new Image { BitmapEffect = new DropShadowBitmapEffect(), Stretch = Stretch.Fill, Source = new BitmapImage(new Uri("/WpfApplication1;component/images/PopupImage.png")) }; 主窗口中的我的代码: private v

我的解决方案资源管理器映像:

PopupInHelper中的我的代码:

var img = new Image
{
    BitmapEffect = new DropShadowBitmapEffect(),
    Stretch = Stretch.Fill,
    Source = new BitmapImage(new Uri("/WpfApplication1;component/images/PopupImage.png"))
};
主窗口中的我的代码:

private void button1_Click(object sender, RoutedEventArgs e)
{
    cuswin.PopupWinHelper.ShowPopUp(150,300,"asdad", new Thickness(20));
}
为什么会发生这种错误

那我就用:

var img = new Image
{
    BitmapEffect = new DropShadowBitmapEffect(),
    Stretch = Stretch.Fill,
    Source = new BitmapImage(new Uri("/images/PopupImage.png", UriKind.Relative))
};
没有错误。但图片中并没有显示

Source = new BitmapImage(new Uri("/WpfApplication1;component/images/PopupImage.png", UriKind.Relative))
假设PopupImage.png是一个资源,应该可以工作

问候