Draggable tab items on Avalonia here!
This is a port of the Draggablz
Install the library as a NuGet package:
Install-Package Tabalonia
# Or 'dotnet add package Tabalonia'
Add the following to your App.axaml:
...
xmlns:themes="clr-namespace:Tabalonia.Themes.Custom;assembly=Tabalonia"
...
<Application.Styles>
...
<themes:FluentTheme/>
</Application.Styles>
...
Done! Use TabsControl like:
...
xmlns:controls="clr-namespace:Tabalonia.Controls;assembly=Tabalonia"
...
<controls:TabsControl ItemsSource="{Binding TabItems}"
NewItemFactory="{Binding NewItemFactory}"
FixedHeaderCount="1">
<TabControl.ContentTemplate>
<DataTemplate DataType="{x:Type dragablzDemo:TabItemViewModel}">
<Grid Background="{DynamicResource SelectedTabItemBackgroundBrush}">
<TextBlock Text="{Binding SimpleContent}"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Grid>
</DataTemplate>
</TabControl.ContentTemplate>
<TabControl.ItemTemplate>
<DataTemplate DataType="{x:Type dragablzDemo:TabItemViewModel}">
<TextBlock Text="{Binding Header}" />
</DataTemplate>
</TabControl.ItemTemplate>
</controls:TabsControl>