开发者

Fire a template child event in current context?

Is there a way to fire an event from a visual within a DataTemplate in the current context (i.e. Page, Window, UserControl etc.).

For example I have a DataTemplate that contains a button or a ListBox. I want that when the button is clicked or when ListBox.SelectionChanged is fired in the ListBox, the event han开发者_如何学Pythondler should be declared on the Page that contains the ControlControl which uses this DataTemplate.

Any ideas?


Use RoutedCommands.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜