2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-04-05 17:39:39 -04:00
pulsar/ObservatoryCore/UI/TabTemplateSelector.cs
2021-06-03 22:25:32 -02:30

32 lines
742 B
C#

using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Avalonia.Metadata;
using Observatory.UI.Views;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Observatory.UI
{
public class TabTemplateSelector : IDataTemplate
{
public bool SupportsRecycling => false;
[Content]
public Dictionary<string, IDataTemplate> Templates { get; } = new Dictionary<string, IDataTemplate>();
public IControl Build(object param)
{
return new BasicUIView(); //Templates[param].Build(param);
}
public bool Match(object data)
{
return data is BasicUIView;
}
}
}