5 pts.
 How to create a (visual) window baseclass without xaml
Hi, I want to create a window baseclass that contains 3 elements: - a ribbon control (ie devcomponents wpf ribbon) - a region to contain child form controls - a statusbar This way, all windows that inherit from this window will automatically provide these controls (and soms functions). I created a lookless windowbase.cs file that adds a 3-row grid to the window in the constructor containing a ribbon in row 0 and a statusbar in row 2. 2 problems arrise when using this strategy: 1/ The child form does not show any inherited controls during design time. This is a lesser problem, since the ribbon control and status bar can be modified from code-behind in the constructor. 2/ After adding controls to the child window, the xaml cannot be parsed anymore. I guess a need to add something like a contencontrol, to be added to row 1 from the code behind, but previous attempts all led to a inparsable xaml file. Am I missing something obvious here? Visual inheritance is pretty basic in winforms, but I guess this work-around should be possible too...

Software/Hardware used:
VS2008,WPF,C#,.Net 3.5
ASKED: March 30, 2010  9:08 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _