Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is application's site of origin and when to use it

Tags:

  • What is application's site of origin
  • When to use it
  • How is the build action of a resource file associated with it
  • What is the difference between pack://application:,,, and pack://siteoforigin:,,,
like image 477
sudarsanyes Avatar asked May 18 '11 10:05

sudarsanyes


People also ask

What is URI WPF?

In Windows Presentation Foundation (WPF), uniform resource identifiers (URIs) are used to identify and load files in many ways, including the following: Specifying the user interface (UI) to show when an application first starts. Loading images. Navigating to pages.

What browser does WPF use?

A WPF Browser application is an app that runs in-browser as an XBAP (Xaml Browser Application). You can find a little more information on the uses and reasons to use XBAPs here. This thread on MSDN might help also. Show activity on this post.

What is pack application?

Application Pack means the object code software utility release(s) that are designed to work with the Software that may be, in Blackboard's sole discretion, issued in between Updates, designated by AP#, and/or later incorporated into Updates or Upgrades.


1 Answers

The site of origin is the location (i.e. the physical folder) of the application executable assembly (i.e. the .exe that the user runs). The URI is thus relative to that folder.

Example: You have

  • C:\Programs\MyApp\MyApp.exe
  • C:\Programs\MyApp\MyIcon.bmp
  • C:\Programs\MyApp\Icons\MyOtherIcon.bmp

The pack URIs are pack://siteoforigin:,,,/MyIcon.bmp and pack://siteoforigin:,,,/Icons/MyOtherIcon.bmp when running the MyApp.exe. That means you have to copy those files to those places.

In contrast, the application pack URI refers to resources embedded in your assembly (by using Build Action "Resource").

like image 176
Daniel Rose Avatar answered Sep 28 '22 07:09

Daniel Rose