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...
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!