using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Telerik.Windows.Data;
using Telerik.Windows.Controls;
using System.Collections.ObjectModel;

namespace RadGridView_WPF_AR_6
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            ObservableCollection<C> listC = new ObservableCollection<C>();
            listC.Add(new C(new A("class a")));
            listC.Add(new C(new A("class c")));

            myGrid.ItemsSource = listC;
        }

        public class A
        {
            public string AName { get; set; }
            public A(string a)
            {
                this.AName = a;
            }
            public A()
            {
                this.AName = "default a";
            }
        }
        public class B : A
        {
            public string BName { get; set; }
            public B(string b)
            {
                this.BName = b;
            }
            public B()
            {
                this.BName = "default b";
            }
        }

        public class C
        {
            public A baseClass { get; set; }
            public C(A baseClass)
            {
                this.baseClass = baseClass;
            }
        }
    }
}
