0

I made a WiX Burn custom bootstrapper UI using WinForms and put some mnemonics for buttons in my UI using the ampersand(&) notation, like &Next. But it does not work ignoring my key input. How can I fix this? Following code is part of my bootstrapper application.

namespace MyBA_UI
{
    public class MyBA : BootstrapperApplication
    {
        public static Dispatcher Dispatcher { get; set; }

        protected override void Run()
        {
            Dispatcher = Dispatcher.CurrentDispatcher;

            var form = new Mainform(this);

            form.Show();

            Dispatcher.Run();
        }
    }
}
Cœur
  • 37,241
  • 25
  • 195
  • 267
David Johns
  • 1,201
  • 5
  • 15
  • 34

1 Answers1

0

According to this, this problem might be related to mixed use of WinForms and WPF(I firstly wrote my BA using WPF but, changed it to WinForms). So, I edited my code to the following:

namespace MyBA_UI
{
    public class MyBA : BootstrapperApplication
    {
        protected override void Run()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Mainform(this));
        }
    }
}

and it works very well.

Community
  • 1
  • 1
David Johns
  • 1,201
  • 5
  • 15
  • 34