get vaults rendering on the screen
This commit is contained in:
@@ -49,8 +49,8 @@ public class ContentControlHandler(INavigationContext navigationContext) :
|
|||||||
control.Loaded += HandleLoaded;
|
control.Loaded += HandleLoaded;
|
||||||
control.Unloaded += HandleUnloaded;
|
control.Unloaded += HandleUnloaded;
|
||||||
|
|
||||||
|
control.DataContext = args.Content;
|
||||||
contentControl.Content = control;
|
contentControl.Content = control;
|
||||||
contentControl.DataContext = args.Content;
|
|
||||||
|
|
||||||
navigationContext.Set(control);
|
navigationContext.Set(control);
|
||||||
await taskCompletionSource.Task;
|
await taskCompletionSource.Task;
|
||||||
|
|||||||
@@ -53,12 +53,19 @@ public class ComponentBuilder :
|
|||||||
public IComponentBuilder AddConfiguration<TConfiguration>(Action<TConfiguration> configurationDelegate)
|
public IComponentBuilder AddConfiguration<TConfiguration>(Action<TConfiguration> configurationDelegate)
|
||||||
where TConfiguration : ComponentConfiguration, new()
|
where TConfiguration : ComponentConfiguration, new()
|
||||||
{
|
{
|
||||||
AddConfiguration(typeof(TConfiguration).Name, configurationDelegate);
|
TConfiguration configuration = new();
|
||||||
|
|
||||||
|
if (configurationDelegate is not null)
|
||||||
|
{
|
||||||
|
configurationDelegate(configuration);
|
||||||
|
}
|
||||||
|
|
||||||
|
AddConfiguration(typeof(TConfiguration).Name, configuration);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IComponentBuilder AddConfiguration<TConfiguration>(string section,
|
public IComponentBuilder AddConfiguration<TConfiguration>(string section,
|
||||||
Action<TConfiguration>? configurationDelegate = null)
|
TConfiguration? configuration = null)
|
||||||
where TConfiguration :
|
where TConfiguration :
|
||||||
ComponentConfiguration, new()
|
ComponentConfiguration, new()
|
||||||
{
|
{
|
||||||
@@ -68,27 +75,21 @@ public class ComponentBuilder :
|
|||||||
}
|
}
|
||||||
|
|
||||||
configurationRegistered = true;
|
configurationRegistered = true;
|
||||||
TConfiguration configuration = new();
|
|
||||||
|
|
||||||
if (configurationDelegate is not null)
|
|
||||||
{
|
|
||||||
configurationDelegate(configuration);
|
|
||||||
}
|
|
||||||
|
|
||||||
hostBuilder.ConfigureServices(services =>
|
hostBuilder.ConfigureServices(services =>
|
||||||
{
|
{
|
||||||
services.AddConfiguration<ComponentConfiguration>(section: section,
|
services.AddConfiguration<ComponentConfiguration>(section: section,
|
||||||
defaultConfiguration: configuration);
|
defaultConfiguration: configuration);
|
||||||
|
|
||||||
services.AddConfiguration(configuration);
|
services.AddConfiguration(section: section,
|
||||||
|
defaultConfiguration: configuration);
|
||||||
});
|
});
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IComponentBuilder AddConfiguration<TConfiguration>(string section)
|
public IComponentBuilder AddConfiguration<TConfiguration>(string section)
|
||||||
where TConfiguration :
|
where TConfiguration : ComponentConfiguration, new()
|
||||||
ComponentConfiguration, new()
|
|
||||||
{
|
{
|
||||||
AddConfiguration<TConfiguration>(section, null);
|
AddConfiguration<TConfiguration>(section, null);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public interface IComponentBuilder
|
|||||||
where TConfiguration : ComponentConfiguration, new();
|
where TConfiguration : ComponentConfiguration, new();
|
||||||
|
|
||||||
IComponentBuilder AddConfiguration<TConfiguration>(string section,
|
IComponentBuilder AddConfiguration<TConfiguration>(string section,
|
||||||
Action<TConfiguration>? configurationDelegate = null)
|
TConfiguration? configuration = null)
|
||||||
where TConfiguration : ComponentConfiguration, new();
|
where TConfiguration : ComponentConfiguration, new();
|
||||||
|
|
||||||
IComponentBuilder AddConfiguration<TConfiguration>(string section)
|
IComponentBuilder AddConfiguration<TConfiguration>(string section)
|
||||||
|
|||||||
Reference in New Issue
Block a user