Results 1 to 4 of 4

Thread: [RESOLVED] WPF Designer: selecting an Image Source

  1. #1

    Thread Starter
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Resolved [RESOLVED] WPF Designer: selecting an Image Source

    I expect this will be so obvious to everyone that no one ever thinks it worth mentioning, but I can't find how to do it. How do I set the source for an Image in VB2008 Express/WPF Designer? The only way I can find so far is to type in a path.

    1. Is there some way to browse for the image source, as in old fashioned WinForms?

    2. How can I select a program resource as the Source?

    3. Can I get a bit of help information about each property as in WinForms? Nothing shows in WPF designer.

    tia, BB

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: WPF Designer: selecting an Image Source

    Have you got SP1 installed for Visual Studio 2008? They improved the WPF designer a bit in that but it still doesnt let you browse for a local image on your hard drive - what it does do though is give you a drop down list of all of the images that you have added to your project. I usually create a folder in my project called Images and just right click on that and go to Add Existing Item and browse to the image file, then when its in the project I click on the Image element in the designer and click the drop down button next to the Source property.

    As for question number 3 - I miss that feature a little as well but it seems there is no way to enable that in the WPF designer (not that I have found anyway)
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3

    Thread Starter
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: WPF Designer: selecting an Image Source

    Hi Chris,

    Yes I do have SP1. I dread to think what the WPF designer must have been like before that. Keeping a folder of image files is a workable idea, but it doesn't quite make the designer ripe for amateur RAD . Besides, it seems unreliable: the bitmaps don't always appear in the Source drop down (even after rebuilding), deleting a file causes errors even when the file isn't in use, and Visual Studio tends to crash on loading larger images (>10 MP or so) or on running the program with one of them. Maybe these problems have something to do with my computer (XPh, isn't 2GB memory enough?).

    I was hoping to try out WPF as part of a painting/photo processing program. Would it offer smoother image zooming and scrolling than GDI+? If it does, I now realize I will have to learn a lot more about WPF before I can take advantage of it for that purpose. I still plan to try embedding an image control in a Windows.Forms WPF host for usefulness.

    Thanks anyway for resolving my questions.

    cheers, BB

  4. #4
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: WPF Designer: selecting an Image Source

    All I can say really is: wait for Visual Studio 2010.
    WPF is still very young and as such there are still bugs or problems that could be easily overcome in winforms because winforms has had a huge amount of time spent on developing it over the years. WPF will get there, its just that we are still basically on WPF release 1.5 at the moment so not everything is perfect unfortunately. Hopefully VS 2010 and WPF 4 (which is WPF version 2 really if you ask me) will cure a lot of these issues.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width