1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-12 21:38:38 +00:00
Artemis/src/Artemis.UI/PageFactory.cs
RobertBeekman 962b13c6ed
UI - Added routing (#802)
ColorGradient - Fixed GetColor returning the first stop if position was after the last stop
2023-07-02 22:15:38 +02:00

29 lines
580 B
C#

using System;
using Avalonia.Controls;
using FluentAvalonia.UI.Controls;
namespace Artemis.UI;
public class PageFactory : INavigationPageFactory
{
private readonly ViewLocator _viewLocator;
public PageFactory()
{
_viewLocator = new ViewLocator();
}
/// <inheritdoc />
public Control? GetPage(Type srcType)
{
return null;
}
/// <inheritdoc />
public Control GetPageFromObject(object target)
{
Control control = _viewLocator.Build(target);
control.DataContext = target;
return control;
}
}