How to create a (visual) window baseclass without xaml

5 pts.
Tags:
baseform
C#
child
code behind
Inheritance
Template
visual
window
wpf
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

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following