private static void OnGotFocus(object sender, KeyboardFocusChangedEventArgs e)
{
ActiveXHost axhost = sender as ActiveXHost;
if (axhost != null)
{
Invariant.Assert(axhost.ActiveXState >= ActiveXHelper.ActiveXState.InPlaceActive, "Should at least be InPlaceActive when getting focus");
if (axhost.ActiveXState < ActiveXHelper.ActiveXState.UIActive)
{
axhost.TransitionUpTo(ActiveXHelper.ActiveXState.UIActive);
}
}
}