Задайте вопросЗадайте вопрос
 

ОтвеченоUserControl Inheritance

Ответы

  • 28 марта 2008 г. 2:30Marco Zhou Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     Отвечено
    In current version of WPF, you cannot subclass from XAML generated classes, you need to do it in code instead something like the following should work:

    Code Snippet

    public class Parent : UserControl
    {
    }

    <src:Parent x:Class="Test.Child"
                     xmlns:src="clr-namespace:Test"
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"/>


    Hope this helps

Все ответы