Bug Report T292897
Visible to All Users

DXTabControl headers are not rendered correctly when the Header and Visibility properties are updated using data binding

created 9 years ago

I have a DXTabControl that is contained in a UserControl. The UserControl is hosted by a DocumentPanel in a DockLayoutManager.

The tab control is populated by a set of tab items, and the header and visibility of the tab items are updated using data binding:

XAML
<dx:DXTabControl.ItemContainerStyle> <Style TargetType="{x:Type dx:DXTabItem}"> <Setter Property="Header" Value="{Binding Header}"/> <Setter Property="Visibility" Value="{Binding Available, Converter={x:Static mvvm:BoolToVisibilityConverter.ToCollapsed}, Mode=OneWay}"/> </Style> </dx:DXTabControl.ItemContainerStyle>

The problem is that the Header text is not shown when setting the Visibility to "Visible" (see screenshot). (But the layout, i.e. size, seems to be correct.) If I select a tab, the header text will be shown correctly for that tab.

As a test I modified the registration of the Header property in HeaderedSelectorItemBase<TContainer, TItem>, by adding FrameworkPropertyMetadataOptions.AffectsRender as a property option:

C#
public static readonly DependencyProperty HeaderProperty = HeaderedContentControl.HeaderProperty.AddOwner(typeof(HeaderedSelectorItemBase<TContainer, TItem>), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender, (d, e) => ((HeaderedSelectorItemBase<TContainer, TItem>)d).OnHeaderChanged(e.OldValue, e.NewValue)));

After this change, the header text seems to be presented correctly. Is this something you can look into?

I have not had the time to create a repro, but if you need one I will try to find the time.

/Andreas

Show previous comments (2)
DevExpress Support Team 9 years ago

    Many thanks for your sample. I have reproduced the issue and will inform our developers about it. They will research why it occurs.
    We will let you know once we have any results.

    AS AS
    Andreas Suurkuusk 9 years ago

      Any updates on this?

      Kirill (DevExpress Support) 9 years ago

        Hello,
        Our R&D team is currently researching the cause of this issue. However, we cannot provide you with any precise time frames when this issue will be fixed. Please follow our notifications to be informed about our progress.

        Thanks,
        Kirill

        Answers approved by DevExpress Support

        created 9 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.