Ensure containers show up in the menu when they are created
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public record Activated;
|
||||
public record Activated<TValue>(TValue? Value = default);
|
||||
|
||||
public record Activated
|
||||
{
|
||||
public static Activated<TValue> As<TValue>(TValue value) => new(value);
|
||||
|
||||
public static Activated<TValue> As<TValue>() where TValue : new() => new(new TValue());
|
||||
}
|
||||
|
||||
@@ -20,6 +20,6 @@ public class ConfigurationInitializer<TConfiguration>(IConfigurationReader<TConf
|
||||
}
|
||||
}
|
||||
|
||||
await publisher.PublishUI(new Changed<TConfiguration>(configuration));
|
||||
await publisher.PublishUI(new Activated<TConfiguration>(configuration));
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public interface IContainer<T>
|
||||
public interface IValueStore<T>
|
||||
{
|
||||
T? Value { get; }
|
||||
|
||||
@@ -92,12 +92,13 @@ public partial class ObservableViewModel<TKey, TValue>(IServiceProvider provider
|
||||
IMediator mediator,
|
||||
IPublisher publisher,
|
||||
ISubscriber subscriber,
|
||||
IDisposer disposer) : ObservableViewModel(provider, factory, mediator, publisher, subscriber, disposer)
|
||||
where TValue : notnull
|
||||
IDisposer disposer,
|
||||
TValue? value = null) : ObservableViewModel(provider, factory, mediator, publisher, subscriber, disposer)
|
||||
where TValue : class
|
||||
{
|
||||
[ObservableProperty]
|
||||
private TKey? key;
|
||||
|
||||
[ObservableProperty]
|
||||
private TValue? value;
|
||||
private TValue? value = value;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public class Container<T> :
|
||||
IContainer<T>
|
||||
public class ValueStore<T> :
|
||||
IValueStore<T>
|
||||
{
|
||||
public T? Value { get; private set; }
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Toolkit.UI.Controls;
|
||||
|
||||
public class AttachedFlyout : PopupFlyoutBase
|
||||
{
|
||||
protected override Control CreatePresenter()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user