Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CommandRouting using a button.
Message
From
16/04/2008 11:56:18
 
 
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Miscellaneous
Thread ID:
01309791
Message ID:
01311155
Views:
23
>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform