Skip to content

Commit

Permalink
Merge pull request picoe#863 from SlowLogicBoy/develop
Browse files Browse the repository at this point in the history
Make Wpf DialogHandler more extendable
  • Loading branch information
cwensley authored Aug 30, 2017
2 parents 11fcc61 + 158a3cb commit bfc601a
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions Source/Eto.Wpf/Forms/DialogHandler.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using Eto.Forms;
using sw = System.Windows;
using swc = System.Windows.Controls;
Expand All @@ -15,22 +15,24 @@ public class DialogHandler : WpfWindow<sw.Window, Dialog, Dialog.ICallback>, Dia
swc.DockPanel dockMain;
swc.Grid gridButtons;

public DialogHandler()
public DialogHandler() : this(new sw.Window()) { }

public DialogHandler(sw.Window window)
{
Control = new sw.Window();
Control = window;
Control.ShowInTaskbar = false;
Resizable = false;
Minimizable = false;
Maximizable = false;
Control.PreviewKeyDown += Control_PreviewKeyDown;

dockMain = new swc.DockPanel();
dockMain = new swc.DockPanel();

gridButtons = new swc.Grid();
gridButtons.RowDefinitions.Add(new swc.RowDefinition());
gridButtons.Visibility = System.Windows.Visibility.Hidden;
gridButtons.Margin = new sw.Thickness();
}
gridButtons = new swc.Grid();
gridButtons.RowDefinitions.Add(new swc.RowDefinition());
gridButtons.Visibility = System.Windows.Visibility.Hidden;
gridButtons.Margin = new sw.Thickness();
}

public override void SetContainerContent(sw.FrameworkElement content)
{
Expand Down

0 comments on commit bfc601a

Please sign in to comment.