BUG: SL3 TabItem HeaderTemplate does not support DataBinding


  • The release of SL3 seems to have broken the data binding of the TabItem HeaderTemplate. In SL2 the ContentControl of the header would be set to the LoadContent of the HeaderTemplate whereas in SL3 the ContentControl.HeaderTemplate is set to the TabItem.HeaderTemplate and so binding does not happen. (See private method UpdateHeaderVisuals for change)

    I did a quick test to verify this would work as expected with the following:

    myTabControl.SelectedItem.Header = myTabControl.SelectedItem.HeaderTemplate.LoadContent();

    Using this code does in fact load the style template and does the data binding as expected.

    A workaround to this is to derive from the TabItem and override the ApplyTemplate to augment the default behavior and add another step to properly set the header.

    Wednesday, July 22, 2009 10:35 AM