This is a migrated thread and some comments may be shown as answers.

Get Image from Referenced Assembly for BictureBox

2 Answers 11 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dario Concilio
Top achievements
Rank 2
Dario Concilio asked on 26 Jan 2017, 11:25 AM

Hi to all,

I have a report in a solution that has several projects referenced between them

  • Client (WPF): reference Report and Entities
  • Entities (Assembly)
  • Resources (Assembly): bitmap called LOGO.BMP with ActionBuild=Resources and saved into root of project
  • Reports (Assembly) reference: Entities and Resources

I have valued a property value of picturebox with a string in this mode PictureUrl = "pack://application:,,,/Brema.Resources;component/LOGO.BMP";

If I use this url in XAML file of my application it works correctly, but if I use in my report it shows me an errore that says url with wrong format (see attachment).

Why? I read Microsoft documentation about Uri format, but it's all correct, infact, it works as Uri in WPF application.

 

2 Answers, 1 is accepted

Sort by
0
Dario Concilio
Top achievements
Rank 2
answered on 26 Jan 2017, 11:27 AM

Sorry..

a clarification: all project name starts with Brema. (my root name)

0
Stef
Telerik team
answered on 26 Jan 2017, 12:52 PM
Hi Dario,

The PictureBox.Value property can use an URL to an image, but not one from a package (this is WPF specific). Try using a user function in an expression set as PictureBox.Value, where the function gets the image object and returns it.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Dario Concilio
Top achievements
Rank 2
Answers by
Dario Concilio
Top achievements
Rank 2
Stef
Telerik team
Share this question
or