SDK EditBox OnEnter event firing twice

1980
2
06-28-2016 04:34 AM
Highlighted
New Contributor III

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)
Reply
0 Kudos
2 Replies
Highlighted
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

Reply
0 Kudos
Highlighted
New Contributor III

Thank you Uma.

Reply
0 Kudos