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

c# - Move local mssql database to webhosted MYSQL -

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -