SDK EditBox OnEnter event firing twice

2350
2
06-28-2016 04:34 AM
by Anonymous User
Not applicable

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

Tags (2)
0 Kudos
2 Replies
UmaHarano
Esri Regular Contributor

Hi Luke

I have passed  on your findings to the Framework team - I don't have estimate as to when it will be fixed. I will keep you posted.

Thanks

Uma

0 Kudos
by Anonymous User
Not applicable

Thank you Uma.

0 Kudos