c# - How is the RoutedCommand.Name property used? -



c# - How is the RoutedCommand.Name property used? -

the routedcommand class has name property can set in contructor. msdn has routedcommand.name:

this property can used when referencing routedcommand in xaml.

however, can't seem find info on how this. currently, commands referenced in xaml this:

command="{x:static somenamespace:commands.somecommand}"

this does not refer command name property, , works whether or not set name.

what purpose of routedcommand.name, , how can used?

routedcommand.name literally serves name of routedcommand bind dependencypropery of uielement, menuitem or button.

please, refer xaml code below, applicationcommands class included in system.windows.input namespace(presentationcore.dll).

<button command="{x:static applicationcommands.open}" content="{binding source={x:static applicationcommands.open}, path=name}"/>

c# .net wpf routed-commands

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -