Skip to content

Draggable tab items on Avalonia here!

License

Notifications You must be signed in to change notification settings

haroohie-club/Tabalonia

 
 

Repository files navigation

Tabalonia

Nuget

Draggable tab items on Avalonia here!

This is a port of the Draggablz

example

Getting Started

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>

About

Draggable tab items on Avalonia here!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%