I have a custom Silverlight user control (which resides in a separate DLL we'll call usercontrol.dll) that builds a simple 3D page turning book. I have a project referencing this DLL and the project also has a folder, Pages, that contains all of the pages. The pages are labelled "page_1.xaml, page_2.xaml, ..., page_n.xaml." The number of pages in a book is variable.
I want to use the custom control in my project as follows:
<customControls:BookControl />
Short and sweet. To make things work, I want the BookControl to "reach out" from within its assembly to the parent project that is calling it and read through the "Pages" folder to automatically load each page into the book.
I'm trying to avoid passing in parameters. If the DLL can read through the projects folder and create a list of pages then I will have solved all of my problems.
My problem right now is that I don't know how to call out to the parent project and read through the Pages folder.
How can I access the folder of a Silverlight project from a referenced DLL?