Files
BeWoPlaner/BeWoLauncher/WindowImp/PopUpWindow.xaml.cs
2021-09-30 15:31:13 +02:00

56 lines
1.2 KiB
C#

using BS.SharedLauncher.Windows;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace BeWoLauncher.WindowImp
{
/// <summary>
/// Interaktionslogik für PopUpWindow.xaml
/// </summary>
public partial class PopUpWindow : Window, IPopUpWindow
{
public bool Abbruch { get; set; }
public PopUpWindow()
{
InitializeComponent();
Abbruch = false;
CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) =>
{
Abbruch = true;
Close();
}));
}
public PopUpWindow(UserControl content) : this()
{
SetContent(content);
}
public Window GetWindow()
{
return this;
}
public void SetContent(UserControl usa)
{
root.Children.Clear();
root.Children.Add(usa);
}
}
}