[英]Event Handler Windows Phone 7
I'm using http://babaandthepigman.wordpress.com/2010/09/22/wp7-looping-selector/ as a timer selector 我正在使用http://babaandthepigman.wordpress.com/2010/09/22/wp7-looping-selector/作为计时器选择器
It has an even handler for example 例如,它有一个偶数处理程序
hours.DataSource.SelectionChanged += //not sure what to put here
I'm not sure what to put after the += and I don't know where the whole code block should be placed in my WP7 app? 我不确定在+ =后面应该放什么,而且我不知道整个代码块应该放在WP7应用程序的什么位置?
I want a button to be enabled when the selector is changed. 我希望在更改选择器时启用一个按钮。
Something like this: 像这样:
hours.DataSource.SelectionChanged +=
new EventHandler<SelectionChangedEventArgs>(DataSource_SelectionChanged);
Then create the method like this: 然后创建如下方法:
void DataSource_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
// Your code here!
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.