Hi everybody,
i have a application command that should do some action on the actual uielement of my page. I also have an input gesture for that command. The canexecute method looks somewhat like
e.CanExecute = false;
object o = Keyboard.FocusedElement;
if (o != null)
{
if (o is TextBox)
{
...
e.CanExecute = true;
This is working fine, until i click on a minimized ribbon. If i do so, there are two calls for canexecute, first call retrieves the right uielement, for the second call Keyboard.FocusedElement is null.
There seems to be a solution for that, because the integrated ApplicationCommands (like Undo, Cut,..) are working as expected.
Michael
i have a application command that should do some action on the actual uielement of my page. I also have an input gesture for that command. The canexecute method looks somewhat like
e.CanExecute = false;
object o = Keyboard.FocusedElement;
if (o != null)
{
if (o is TextBox)
{
...
e.CanExecute = true;
This is working fine, until i click on a minimized ribbon. If i do so, there are two calls for canexecute, first call retrieves the right uielement, for the second call Keyboard.FocusedElement is null.
There seems to be a solution for that, because the integrated ApplicationCommands (like Undo, Cut,..) are working as expected.
Michael