开发者

WPF image source

开发者 https://www.devze.com 2023-03-20 01:20 出处:网络
I have a wpf page defined in a runtime bound dll. I am trying to place an image on the page from a folder in the main app.

I have a wpf page defined in a runtime bound dll.

I am trying to place an image on the page from a folder in the main app.

The main as is called "Panel". I am doing this:

    <Image Source="/Panel;component/Images/LRL.bmp" Height="46" HorizontalAlignment="Left" Margin="306,90,0,0" Name="imgLRL" Stretch="Fill" VerticalAlignment="Top" Width="127"  />

While the image resolves at design time, it is blank when run. Any su开发者_如何学JAVAggestions?

I just tried, per suggestion:

    <Image Height="46" HorizontalAlignment="Left" Margin="306,90,0,0" Name="imgLRL" Stretch="Fill" VerticalAlignment="Top" Width="127" Source="pack://application:,,,/Panel;component/Images/LRL.bmp" />

but same thing


When I added an images, I have a subfolder called images and I do something like this

<Image Source="Images/someimage.bmp" />

Maybe this is what you need to.


Snoop helped me resolve this. Thanks for the turn on to a new utility for me.

0

精彩评论

暂无评论...
验证码 换一张
取 消