PackUriHelper..::.Create Method
This page is specific to:.NET Framework Version:3.03.54.0
.NET Framework Class Library
PackUriHelper..::.Create Method

Creates a new pack URI.

Overload List

  NameDescription
Public methodStatic memberCreate(Uri)Creates a new pack URI that points to a package.
Public methodStatic memberCreate(Uri, Uri)Creates a pack URI given a Package URI and the URI of a part in the package.
Public methodStatic memberCreate(Uri, Uri, String)Creates a pack URI given a Package URI, the URI of a part in the package, and a "#" fragment to append.
Top
Remarks

The following table illustrates sample cases for the Create method.

 packageUri

 partUri

 fragment

 Returned pack URI

 http://www.proseware.com/mypackage.pkg 

 /page1.xaml 

 #intro 

 pack://http:,,www.proseware.com,mypackage.pkg/page1.xaml#intro 

 http://www.proseware.com/mypackage.pkg 

 /page2.xaml 

 null 

 pack://http:,,www.proseware.com,mypackage.pkg/page2.xaml 

 http://www.proseware.com/mypackage.pkg 

 /a/page4.xaml 

 null 

 pack://http:,,www.proseware.com,mypackage.pkg/a/page4.xaml 

 http://www.proseware.com/mypackage.pkg 

 /%41/%61.xml 

 null 

 pack://http:,,www.proseware.com,mypackage.pkg/A/a.xml 

 http://www.proseware.com/mypackage.pkg 

 /%25XY.xml 

 null 

 pack://http:,,www.proseware.com,mypackage.pkg/%25XY.xml 

 http://www.proseware.com/mypackage.pkg 

 /a/page5.xaml 

 #summary

 pack://http:,,www.proseware.com,mypackage.pkg/a/page5.xaml#summary 

 http://www.proseware.com/packages.aspx?pkg04 

 /page1.xaml 

 #intro 

 pack://http:,,www.proseware.com,packages.aspx%3fpkg04/page1.xaml#intro 

 http://www.proseware.com/mypackage.pkg 

 null 

 null 

 pack://http:,,www.proseware.com,mypackage.pkg 

 ftp://ftp.proseware.com/packages/mypackage1.abc 

 /a/mydoc.xaml 

 null 

 pack://ftp:,,ftp.proseware.com,packages,mypackage1.abc/a/mydoc.xaml 

 file:///d:/packages/mypackage2.pkg 

 /a/bar.xaml 

 #xref 

 pack://file:,,,d:,packages,mypackage2.pkg/a/bar.xaml#xref 

Composing a pack URI is a multi-step process. For example, one step in forming a pack URI is to replace the forward slash (/) characters of the packageUri with commas (,).

For more information on string conversion and how pack URIs are formed, see Appendix A.4 "String Conversion Examples" and Appendix B.3 "Composing a Pack URI" in the Open Packaging Conventions specification available for download at Specifications and License Downloads.

See Also

Reference

Other Resources

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View