Configutation writer fixed
This commit is contained in:
@@ -15,16 +15,20 @@ public class ContentTemplateSelector : IDataTemplate, IContentTemplateSelector
|
||||
this.templateFactory = templateFactory;
|
||||
}
|
||||
|
||||
public IControl? Build(object? item)
|
||||
public IControl? Build(object? content)
|
||||
{
|
||||
if (item is not null)
|
||||
if (content is not null)
|
||||
{
|
||||
if (dataTracking.TryGetValue(item, out IControl? control))
|
||||
if (dataTracking.TryGetValue(content, out IControl? control))
|
||||
{
|
||||
return control;
|
||||
}
|
||||
else
|
||||
{
|
||||
control = (IControl?)templateFactory.Create(content);
|
||||
}
|
||||
|
||||
return (IControl?)templateFactory.Create(item);
|
||||
return control;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Avalonia.Controls;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using Mediator;
|
||||
using System.Diagnostics;
|
||||
using Toolkit.Framework.Foundation;
|
||||
|
||||
namespace Toolkit.Framework.Avalonia;
|
||||
@@ -92,14 +91,6 @@ public class NavigateHandler : IRequestHandler<Navigate>
|
||||
{
|
||||
hasNavigated = await mediator.Send(new ContentControlNavigation(contentControl, content, template, keyedParameters));
|
||||
}
|
||||
|
||||
if (hasNavigated)
|
||||
{
|
||||
if (content is INavigated navigated)
|
||||
{
|
||||
await navigated.Navigated();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user