Skip to content
James Willock edited this page Feb 16, 2016 · 3 revisions

There are various mechanisms to help you add a new tab; choose the mechanism most appropriate for your application.

TabablzControl.AddItemCommand

There is a routed command, which, if executed will add a new tab. Before you use this you should be aware of TabablzControl.NewItemFactory.

TabablzControl.NewItemFactory

Using this mechanism you need to provide a factory to create a new tab item. This could be a view model (you would have DataTemplate available in your XAML. or a DragablzItem.

Executing TabablzControl.AddItemCommand

TabablzControl.ShowDefaultAddButton

This is the easiest way to add new tabs; it will cause the standard themes to show an "add" button.

Manual

It is possible to execute the command from your own button (typically within the TabablzControl).

<Button Command="{x:Static dragablz:TabablzControl.AddItemCommand}" />

TabablzControl.AddItem

The static AddItem method can be called via code to add a new tab item. The arguments allow you to control where the item should appear (as there maybe multiple active Windows/docks).

Clone this wiki locally