WIP
This commit is contained in:
@@ -129,11 +129,6 @@ public class ContentDialogHandler(IDispatcher dispatcher) :
|
||||
|
||||
// A hack to wait for the dialog to finish loading up to make it appear more responsive
|
||||
await Task.Delay(250);
|
||||
if (content is IInitialization initializer)
|
||||
{
|
||||
await initializer.Initialize();
|
||||
}
|
||||
|
||||
if (content is IActivated activated)
|
||||
{
|
||||
await activated.OnActivated();
|
||||
|
||||
@@ -17,7 +17,6 @@ public class ContentTemplate :
|
||||
if (observableViewModel.Provider is IServiceProvider provider)
|
||||
{
|
||||
Type itemType = item.GetType();
|
||||
|
||||
if (provider.GetRequiredKeyedService<IContentTemplateDescriptor>(itemType.Name.Replace("ViewModel", ""))
|
||||
is IContentTemplateDescriptor descriptor)
|
||||
{
|
||||
@@ -28,11 +27,6 @@ public class ContentTemplate :
|
||||
control.Loaded -= HandleLoaded;
|
||||
if (control.DataContext is object content)
|
||||
{
|
||||
if (content is IInitialization initializer)
|
||||
{
|
||||
await initializer.Initialize();
|
||||
}
|
||||
|
||||
if (content is IActivated activated)
|
||||
{
|
||||
await activated.OnActivated();
|
||||
|
||||
@@ -72,11 +72,6 @@ public class FrameHandler :
|
||||
sender.AddHandler(Frame.NavigatingFromEvent, HandleNavigatingFrom);
|
||||
if (sender.DataContext is object content)
|
||||
{
|
||||
if (content is IInitialization initializer)
|
||||
{
|
||||
await initializer.Initialize();
|
||||
}
|
||||
|
||||
if (content is IActivated activated)
|
||||
{
|
||||
await activated.OnActivated();
|
||||
|
||||
Reference in New Issue
Block a user