This commit is contained in:
Nikita Tsukanov
2019-06-22 11:34:40 +03:00
parent 3655b6eea1
commit 3e071fc366
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ namespace ControlCatalog
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktopLifetime)
desktopLifetime.MainWindow = new MainWindow();
else if (ApplicationLifetime is ISingleViewLifetime singleViewLifetime)
else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewLifetime)
singleViewLifetime.MainView = new MainView();
base.OnFrameworkInitializationCompleted();
+1 -1
View File
@@ -156,7 +156,7 @@ namespace Avalonia
/// Application lifetime, use it for things like setting the main window and exiting the app from code
/// Currently supported lifetimes are:
/// - <see cref="IClassicDesktopStyleApplicationLifetime"/>
/// - <see cref="ISingleViewLifetime"/>
/// - <see cref="ISingleViewApplicationLifetime"/>
/// - <see cref="IControlledApplicationLifetime"/>
/// </summary>
public IApplicationLifetime ApplicationLifetime { get; set; }
@@ -1,6 +1,6 @@
namespace Avalonia.Controls.ApplicationLifetimes
{
public interface ISingleViewLifetime : IApplicationLifetime
public interface ISingleViewApplicationLifetime : IApplicationLifetime
{
Control MainView { get; set; }
}
@@ -49,7 +49,7 @@ namespace Avalonia.LinuxFramebuffer
}
}
class LinuxFramebufferLifetime : IControlledApplicationLifetime, ISingleViewLifetime
class LinuxFramebufferLifetime : IControlledApplicationLifetime, ISingleViewApplicationLifetime
{
private readonly LinuxFramebuffer _fb;
private TopLevel _topLevel;