From f439c141db354cdc9e70d9533e7d399a589b4f2f Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Thu, 16 Jun 2016 17:04:23 +0300 Subject: [PATCH] Don't try to preview App.xaml --- src/Avalonia.DesignerSupport/DesignerAssist.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Avalonia.DesignerSupport/DesignerAssist.cs b/src/Avalonia.DesignerSupport/DesignerAssist.cs index 3f6a46020f..8787144665 100644 --- a/src/Avalonia.DesignerSupport/DesignerAssist.cs +++ b/src/Avalonia.DesignerSupport/DesignerAssist.cs @@ -115,7 +115,7 @@ namespace Avalonia.DesignerSupport { Children = { - new TextBlock {Text = "Styles can't be edited without Design.PreviewWith. Add"}, + new TextBlock {Text = "Styles can't be previewed without Design.PreviewWith. Add"}, new TextBlock {Text = ""}, new TextBlock {Text = " "}, new TextBlock {Text = ""}, @@ -123,6 +123,8 @@ namespace Avalonia.DesignerSupport } }; } + if (loaded is Application) + control = new TextBlock {Text = "Application can't be previewed in design view"}; else control = (Control) loaded;