AnsweredAssumed Answered

SDK EditBox OnEnter event firing twice

Question asked by luke.coursey on Jun 28, 2016
Latest reply on Jul 4, 2016 by luke.coursey

I've added an SDK "EditBox" control to my Add-In tab, however I've got a problem where the override method "OnEnter" is firing twice when I type some text and hit enter.

 

My className property of my editBox in the XAML points to the following class - but hitting enter triggers the method twice.

 

using System.Linq;
using ArcGIS.Desktop.Framework;

namespace Pro.Test
{
    internal class TestEditBox : ArcGIS.Desktop.Framework.Contracts.EditBox
    {
        public TestEditBox()
        {
            Text = "";           
        }

        protected override void OnEnter() //this fires twice on a single keypress
        {
            Messagebox.Show("enter pressed");
        }
    }
}


 

Any ideas? Is it firing on keydown then on keyup again in error?

 

EDIT: the method also fires when I right click the editBox, what's going on?

 

Regards,

Luke

Outcomes