Click here to Skip to main content
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 OriginalGriff 210
1 Richard MacCutchan 100
2 kbrandwijk 90
3 ChauhanAjay 80
4 ProgramFOX 80
0 Sergey Alexandrovich Kryukov 9,050
1 OriginalGriff 8,151
2 CPallini 2,613
3 Richard MacCutchan 2,221
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 12 Oct 2012
Copyright © CodeProject, 1999-2014
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