diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/MainWindow.xaml b/src/modules/fancyzones/editor/FancyZonesEditor/MainWindow.xaml
index fbd798a3b0c4..f87445e6a868 100644
--- a/src/modules/fancyzones/editor/FancyZonesEditor/MainWindow.xaml
+++ b/src/modules/fancyzones/editor/FancyZonesEditor/MainWindow.xaml
@@ -133,22 +133,7 @@
KeyDown="LayoutItem_KeyDown"
MouseDown="LayoutItem_Click"
Margin="0,0,0,12">
-
-
-
-
-
-
-
-
+
@@ -436,6 +421,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
(1) { GridLayoutModel.GridMultiplier },
@@ -343,5 +334,23 @@ private void EditLayoutDialog_PrimaryButtonClick(ContentDialog sender, ContentDi
// reset selected model
Select(_settings.AppliedModel);
}
+
+ private async void DeleteLayout(FrameworkElement element)
+ {
+ var dialog = new ModernWpf.Controls.ContentDialog()
+ {
+ Title = FancyZonesEditor.Properties.Resources.Are_You_Sure,
+ Content = FancyZonesEditor.Properties.Resources.Are_You_Sure_Description,
+ PrimaryButtonText = FancyZonesEditor.Properties.Resources.Delete,
+ SecondaryButtonText = FancyZonesEditor.Properties.Resources.Cancel,
+ };
+
+ var result = await dialog.ShowAsync();
+ if (result == ContentDialogResult.Primary)
+ {
+ LayoutModel model = element.DataContext as LayoutModel;
+ model.Delete();
+ }
+ }
}
}
diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/Models/GridLayoutModel.cs b/src/modules/fancyzones/editor/FancyZonesEditor/Models/GridLayoutModel.cs
index cb7d781bda2b..131673d125b9 100644
--- a/src/modules/fancyzones/editor/FancyZonesEditor/Models/GridLayoutModel.cs
+++ b/src/modules/fancyzones/editor/FancyZonesEditor/Models/GridLayoutModel.cs
@@ -281,6 +281,9 @@ public override void InitTemplateZones()
case LayoutType.PriorityGrid:
InitPriorityGrid();
break;
+ case LayoutType.Custom:
+ InitColumns(); // Custom is initialized with columns
+ break;
}
FirePropertyChanged();
diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.Designer.cs b/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.Designer.cs
index 2dfe1326ac1a..3065f6cd86b9 100644
--- a/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.Designer.cs
+++ b/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.Designer.cs
@@ -177,6 +177,15 @@ public static string Create {
}
}
+ ///
+ /// Looks up a localized string similar to Create custom layout.
+ ///
+ public static string Create_Custom_From_Template {
+ get {
+ return ResourceManager.GetString("Create_Custom_From_Template", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Create new layout.
///
diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx b/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx
index 106a8be0b735..bff67c7b43a4 100644
--- a/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx
+++ b/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx
@@ -328,4 +328,7 @@ To merge zones, select the zones and click "merge".
No layout
+
+ Create custom layout
+
\ No newline at end of file