Groups
Groups
Sign in
Groups
Groups
XAML Disciples
Conversations
About
Send feedback
Help
Binding Commands to arbitrary handlers.
0 views
Skip to first unread message
Mike Brown
unread,
Jul 2, 2009, 1:45:57 PM
7/2/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wpf-di...@googlegroups.com
Guys here's some old cold that I meant to share with you that shows how to use the CommandBindingAdapter (checked into my WPF Toolbelt Project).
It also works if you were to use a binding to the DataContext as well. What do you think?
<
Window.Resources
>
<
ObjectDataProvider
ObjectType
="{
x
:
Type
local
:
ContactTest
}"
x
:
Key
="odp1"/>
<
ObjectDataProvider
ObjectType
="{
x
:
Type
local
:
ObjectInvokerTest
}"
x
:
Key
="odp2"/>
</
Window.Resources
>
<
Util
:
CommandBindingAdapter.AttachCommand
>
<
Util
:
CommandBindingAdapter
Command
="ApplicationCommands.Open"
Executed
="{
Util
:
ExecutedHandler
Target
={
StaticResource
odp2
},
Handler
=InvokeCommand}"/>
</
Util
:
CommandBindingAdapter.AttachCommand
>
Mike Brown
unread,
Jul 2, 2009, 1:46:16 PM
7/2/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wpf-di...@googlegroups.com
Old code even :P
Reply all
Reply to author
Forward
0 new messages