I can't give you specific examples because for me it is part of a complex framework and the context would not make sense (except to me)
in general
//----------------------------------------------------------------------------------------------------------------------
to invoke it...
using PopUpWindow;
then to invoke the popup....
Application.Current.Dispatcher.Invoke((Action)dele gate{PopUp();
//----------------------------------------------------------------------------------------------------------------------
and the PopUp is in the AddOnFolder, with these as the base
//----------------------------------------------------------------------------------------------------------------------
namespace PopUpWindow
{
public class PopUpWindows_Class
{
public partial class PopUp : Window
{
public PopUp()
{
InitializeComponent();
}
//----------------------------------------------------------------------------------------------------------------------
In InitializeComponent you construct the Window Layout with Code, like shown in the prior post
as you are constructing the Windows you probably would like an ESC to close then window...then
this.PreviewKeyDown += new KeyEventHandler(Form_KeyDown);
private void Form_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Escape)
Close();
}
Comment