Click here to Skip to main content
15,892,797 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My Solution Explorer image :
http://postimage.org/image/nyrskovvn/[^]
C#
my code in PopupWinHelper :

        var img = new Image
                          {
                              BitmapEffect = new DropShadowBitmapEffect(),
                              Stretch = Stretch.Fill,
                              Source = new BitmapImage(new Uri("/WpfApplication1;component/images/PopupImage.png"))
                          };

my code in Mainwindow :
C#
private void button1_Click(object sender, RoutedEventArgs e)
       {
           cuswin.PopupWinHelper.ShowPopUp(150,300,"asdad",new Thickness(20));
       }

Why does this error occur?

then I use :
C#
var img = new Image
                 {
                     BitmapEffect = new DropShadowBitmapEffect(),
                     Stretch = Stretch.Fill,
                     Source = new BitmapImage(new Uri("/images/PopupImage.png",  UriKind.Relative))
                 };

no error occurs but the picture is not shown in image control.
Posted
Updated 12-Oct-12 4:52am
v4
Comments
Akinmade Bond 12-Oct-12 10:43am    
What error? And your picture does not help.

1 solution

/WpfApplication1;component/images/PopupImage.png is not a valid URI. Verify the path to your image.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900