Hello,
I'm trying the get the PaneHeaderPresenter to Collapse when the ContentPane is being held within a TabGroupPane, but haven't had any luck no matter how or where I target my templates or styles.
If anyone can point me in the right direction I would greatly appreciate it.
Many thanks...
Hello D Scott Angle,
Thank you for your post.
It appears that when the ContentPane is placed inside of a TabGroupPane, the Visibility of that ContentPane's PaneHeaderPresenter gets resolved internally, and any styling for that header presenter is ignored. Instead of setting the Visibility of this element, I would recommend writing a style for PaneHeaderPresenter and setting the MinHeight and MaxHeight properties to "0." This will effectively hide the PaneHeaderPresenter of your ContentPane elements in your TabGroupPane. This style would look like the following:
<Style TargetType="{x:Type ig:PaneHeaderPresenter}"> <Setter Property="MinHeight" Value="0"/> <Setter Property="MaxHeight" Value="0"/> </Style>
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Hello Andrew,
Thank you for your reply.
In principle your suggestion works just fine. Unfortunately it also targets PaneHeaderPresenters not held within a TabGroupPane.
The solution I've found is to create a DockManager theme template and apply a name to a higher level DockPanel (the first one within my ControlTemplate TabGroupPane.DockableTabGroupTemplateKey). I then use the appearance, as an ancestor, of this named DockPanel as a Condition to trigger a style for the appropriate PaneHeaderPresenter.
It seems to be doing the trick, but was a bit like peeling away onion layers to find were and how to apply the styles.
Thanks again,
Scott
Hello Scott,
Thank you for your response. While you can go along with creation of a new theme template, I would also like you to take a look at the modified sample project that I have attached to this post.
In the attached sample project, everything is very similar to the original sample project that I had sent you. The difference now is that the style for PaneHeaderPresenter now holds a DataTrigger that uses a RelativeSource binding to look for a TabGroupPane as an ancestor of that PaneHeaderPresenter. Using a converter with this binding, you can check whether or not this TabGroupPane actually exists. If it does, you can return a value that tells the DataTrigger to execute and set the MinHeight and MaxHeight of the PaneHeaderPresenter to 0.
I hope this helps you. Please let me know if you have any other questions or concerns on this matter.