Which code fragment should you use?

You are creating a partial trust XAML Browser Application (XBAP) in Windows Presentation Foundation by using Microsoft .NET Framework 3.5.
The application needs to display an image named Forest.jpg. The image can be replaced without rebuilding the application. You need to ensure that the application correctly references the image.
Which code fragment should you use?

You are creating a partial trust XAML Browser Application (XBAP) in Windows Presentation Foundation by using Microsoft .NET Framework 3.5.
The application needs to display an image named Forest.jpg. The image can be replaced without rebuilding the application. You need to ensure that the application correctly references the image.
Which code fragment should you use?

A.
<Image Source="Forest.jpg"/>

B.
<Image Source="pack://resource:,,,/Forest.jpg"/>

C.
<Image Source="pack://application:,,,/Forest.jpg"/>

D.
<Image Source="pack://siteoforigin:,,,/Forest.jpg"/>



Leave a Reply 0

Your email address will not be published. Required fields are marked *