• Stars
    star
    165
  • Rank 228,906 (Top 5 %)
  • Language
    C#
  • License
    MIT License
  • Created over 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Draggable tab items on Avalonia here!

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>