Click here to Skip to main content
11,579,093 members (70,814 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WPF C#4.0
My Solution Explorer image :
http://postimage.org/image/nyrskovvn/[^]
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 :
 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 :
 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 12-Oct-12 2:16am
Edited 12-Oct-12 4:52am
v4
Comments
geekbond at 12-Oct-12 10:43am
   
What error? And your picture does not help.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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

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

  Print Answers RSS
0 Frankie-C 170
1 OriginalGriff 163
2 Afzaal Ahmad Zeeshan 85
3 Richard Deeming 60
4 Suvendu Shekhar Giri 60
0 OriginalGriff 1,003
1 Sergey Alexandrovich Kryukov 750
2 Abhinav S 583
3 F-ES Sitecore 420
4 Dave Kreskowiak 419


Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 12 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100