ImageSources not working in my project

Ribbon for WPF Forum

Posted 17 years ago by Bryan Livingston
Version: 1.0.0340
Avatar
I have a bit of a strange setup. I've got my image resources and most my code in a dll, which is used by two executable projects, one for windows and the other for xbap.

To get the image references to work in the xaml code I had to remove the first forward slashes making them relative. So ImageSourceLarge="Images/New32.png" rather than ImageSourceLarge="/Images/New32.png".

Now I'm tring to use the RibbonCommand sytem and the images just arn't working. Is there something in the controls that expects the images to be in the executable assembly?

Thanks.

Bryan

Comments (1)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Bryan,

No you can load images from any assembly. The path syntax can be confusing though. There was a post in the MSDN on it which was pretty good. We should find that and add it to our wpfpedia.com site.

Anyhow, note that the Window in our ribbon sample uses an icon from our Shared library. So this is similar to what you are doing. Here is the syntax for that:
Icon="/ActiproSoftware.Shared.WPF30;component/Products/Shared/Images/ActiproIcon.ico"
ActiproSoftware.Shared.WPF30 is the assembly that contains the icon. Using this syntax should get it working for you.


Actipro Software Support

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.