mirror of
https://github.com/BlossomiShymae/Needlework.Net.git
synced 2025-12-06 18:20:47 +01:00
Add tabs view to endpoints
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using Avalonia.Controls;
|
||||
using Needlework.Net.ViewModels.Pages.Endpoints;
|
||||
using System.Collections;
|
||||
|
||||
namespace Needlework.Net.Views.Pages.Endpoints;
|
||||
|
||||
public partial class EndpointsTabView : UserControl
|
||||
{
|
||||
public EndpointsTabView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void TabView_TabCloseRequested(FluentAvalonia.UI.Controls.TabView sender, FluentAvalonia.UI.Controls.TabViewTabCloseRequestedEventArgs args)
|
||||
{
|
||||
if (args.Tab.Content is EndpointItem item)
|
||||
((IList)sender.TabItems).Remove(item);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user