Apr 17, 2012 at 11:10 AM

In the Extended Tabcontrol you delete the Code:

DefaultStyleKeyProperty.OverrideMetadata(typeof(TabControl), new FrameworkPropertyMetadata(typeof(TabControl)));

from the original. Why?

2 Problems.

1. With that line its not possible to add 2 Instances of that Control

2. Without that line I can not load all tab items on startup.

Apr 17, 2012 at 11:13 AM

It should have been in the static constructor. This is how it should work:

        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Windows.Controls.TabControl"/>.class.
        /// </summary>
        static TabControl()
            DefaultStyleKeyProperty.OverrideMetadata(typeof(TabControl), new FrameworkPropertyMetadata(typeof(TabControl)));

Apr 17, 2012 at 2:18 PM

Perfect Thanks.