[WPF] ListBoxItem как ICommandSource
От: -ko4evnik-  
Дата: 23.12.10 20:57
Оценка:
ListBoxItem вроде как наследуется только от ContentControl и не реализует интерфейса ICommandSource. и соответсвенно свойства Command в которое можно было бы задать RoutedUICommand не наблюдается...

тем не менее тут : MSDN

пишется такое:
"... WPF provides a number of classes which implement ICommandSource, such as Button, MenuItem, and ListBoxItem. A command source defines how it invokes a command.

WPF provides a number of classes which implement ICommandSource, such as Button, MenuItem, and ListBoxItem. A command source defines how it invokes a command. Button and MenuItem invoke a command when they are clicked. A ListBoxItem invokes a command when it is double clicked. These classes only become a command source when their Command property is set.... "

...Холмс, но как???
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.