Reputation: 3739
I have a tabcontrol and I want to put some tabitem headers aligned to the left, and others aligned to the right. Like in this mock screenshot:
http://img269.imageshack.us/img269/8894/tabcontrol.png
What I've tried already:
But I haven't been able to find a way to mix left and right aligned tab items.
At this point I am out of ideas.
Upvotes: 2
Views: 5999
Reputation: 1
I ended up inserting a hidden tab between the tabs on the left and right to separate them. Simple, and almost does what I want, but the size isn't automatic.
<TabItem IsEnabled="False" Visibility="Hidden">
<TabItem.Header>
<Label Content=" " Width="200"/>
</TabItem.Header>
</TabItem>
Upvotes: 0
Reputation: 70
Thank "Andrew Hanlon", you can use Blend to edit the TabControl
template.
TabPanel
with DockPanel
HorizontalAlignment="Right"
It works with me.
Upvotes: 0
Reputation: 132618
You could try overwriting the Template for the TabPanel
, however if that doesn't work you'll have to overwrite the TabControl.Template
. Default control templates can be found here
Edit
Just tested, and TabPanel
doesn't have a template you can override, so your best bet would be to overwrite the TabControl.Template
to use your own Panel for hosting TabItems.
Upvotes: 3