February 2013
Beginner to intermediate
68 pages
1h 50m
English
The Frame control in WPF allows you to display HTML contents, from both files and pages on the Internet. If you want to display a file, you must assign the Source property with the URI based on the full pathname of the file you want to show. Keep in mind that the pathname is a string, while the Frame.Source property accepts System.Uri. But what about HTML files that are included in the project and published to the same folder of the application? In this case, it’s not possible to use the path where the executable resides, adding the name of the HTML file, because we would get a string where we need the URI.
Imagine you have a file called myFile.htm, which has been added to the project, and now ...