Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CommandRouting using a button.
Message
De
16/04/2008 11:56:18
 
 
À
15/04/2008 16:34:06
Information générale
Forum:
ASP.NET
Catégorie:
Windows Presentation Foundation (WPF)
Divers
Thread ID:
01309791
Message ID:
01311155
Vues:
24
>>When I enter the textbox on my toolbar the paste button does not highlight. If it is already highlighted because I had focus on a pasteable target in my main window it stays highlighted. But pressing it pastes to the main window textbox not to the toolbar textbox.
>
>The scenario I was thinking of was something like
><Window>
><StackPanel FocusManager.IsFocusScope="true">
><Button Command="ApplicationCommands.Save" />
></StackPanel>
><StackPanel FocusManager.IsFocusScope="true">
><TextBox x:Name="T1"/>
></StackPanel>
><StackPanel FocusManager.IsFocusScope="true">
><TextBox x:Name="T2" />
></StackPanel>
></Window>
and which textbox becomes the CommandTarget.

Answer = Neither

Both have been removed from the focus scope of the window.

Change ApplicationCommands.Save to ApplicationCommands.Paste (the textbox has built in handlers for that command) dump it on a form and you will see what I mean.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform