Is there a way to inherit from a WPF Window or UserControl that has XAML associated wit it?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Noope. Only the most derived class can be associated with the XAML. This is because the XAML system instantiates the code-behind instance. You can inherit from non-XAML associated UserControl and Control base classes.
The recommended approach for separating the code inheritance vs. the look and feel inheritance is to use custom styles. These have inheritance via the BasedOn attribute.