Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
460
TabHeader disappears on deactivated ContentPane in DocumentContentHost
posted

Hello Infragistics,

please take a look at the attached project.

I have two ContentPanes in a DocumentContentHost. One of them has Header and TabHeader bound to viewmodel properties. It is not properly displayed in active state (text is not bold) and not in inactive state, either (no text at all).

When I drag both ContentPanes out of the DCH and put them both in the same TabGroupPane outside the DCH, the TabHeader is displayed properly.

Is this a bug or a mistake on my side?
Or alternatively: could you show me how to display a Tooltip for the TabHeader of a ContentPane (using the viewmodel in the attached project)?

Also: The DataContext within the TabHeader is changed from its original value to the ContentPane (forces me to put a "DataContext." prefix in front of each path). Why is that?

WpfApplication3.zip
  • 460
    Offline posted in reply to [Infragistics]TTenev

    OK, then my problem might be solved already:

    http://ko.infragistics.com/community/forums/t/13218.aspx

    Using this TabHeaderTemplate I am able to do what I want:

    <DataTemplate>
       <TextBlock Text="{Binding}" Foreground="Red"
                      ToolTip="{Binding Path=Pane.DataContext.Tooltip, RelativeSource={RelativeSource AncestorType={x:Type i:PaneTabItem}}}" />
    </DataTemplate>

    I had read this forum post even before I asked my question, but a using a DataTemplate seems not appropriate in my situation, that's why I want to set the TabHeader directly. It should be possible, though, so if setting the TabHeader property directly is forbidden by design then I consider this solved.

  • 1530
    Verified Answer
    posted

    Hello,

     

    The proper way of defining custom TabHeader is to use TabHeaderTemplate. However there still seems to be an issue with the DataContext of the template so I have logged this behavior in our internal tracking system with a Development ID of 158870. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.  I have also created a support ticket on your behalf with number CAS-127809-Q8N4N8 in order to link the development issue to it so that you are automatically updated when a Service Release containing your fix is available for download.

     

    You can view the status of all development issues connected to this case from the "Development Issues" tab, when viewing this case on the "My Support Requests" page of our website.