Loading XAML code into FlowDocumentScrollViewer from within project
i found code while searching on msdn , got project working how want to.
// open file contains flowdocument...
filestream xamlfile = new filestream(myfilename, filemode.open, fileaccess.read);
// , parse file xamlreader.load method.
flowdocument content = xamlreader.load(xamlfile) flowdocument;
// finally, set document property flowdocument object was
// parsed input file.
flowdocscrollviewer.document = content;
xamlfile.close();
however, filestream opens external file , not file within project. if i, example, type in "page2.xaml" myfilename program looks "page2.xaml" in debug folder instead of in location within project. assume because uses filestream string determine file open , reads it. there way make opens file within project? didn't think there , prefer stand alone program; i.e. loads flowdocument xaml code project , not external directory or location.
i have xaml files in project containing flowdocument xaml code want shown in flowdocumentscrollviewer (fdsv on). interface of fdsv , built in functionality can't seem find way take files have in project , load them fdsv have in window.
so question is, there way make flowdocumentscrollviewer opens file within project (and not external source)?
// open file contains flowdocument...
filestream xamlfile = new filestream(myfilename, filemode.open, fileaccess.read);
// , parse file xamlreader.load method.
flowdocument content = xamlreader.load(xamlfile) flowdocument;
// finally, set document property flowdocument object was
// parsed input file.
flowdocscrollviewer.document = content;
xamlfile.close();
however, filestream opens external file , not file within project. if i, example, type in "page2.xaml" myfilename program looks "page2.xaml" in debug folder instead of in location within project. assume because uses filestream string determine file open , reads it. there way make opens file within project? didn't think there , prefer stand alone program; i.e. loads flowdocument xaml code project , not external directory or location.
i have xaml files in project containing flowdocument xaml code want shown in flowdocumentscrollviewer (fdsv on). interface of fdsv , built in functionality can't seem find way take files have in project , load them fdsv have in window.
so question is, there way make flowdocumentscrollviewer opens file within project (and not external source)?
Expression > Expression Blend + SketchFlow
Comments
Post a Comment