mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 21:38:38 +00:00
ColorGradient - Fixed GetColor returning the first stop if position was after the last stop
29 lines
580 B
C#
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;
|
|
}
|
|
} |