简体   繁体   English

Windows Phone 7事件处理程序

[英]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.

相关问题 Windows Phone-丢失网络连接的事件处理程序 - Windows Phone - event handler for lost network connection 如何在Windows Phone 8的MVVM中添加事件处理程序? - How to add event handler in MVVM in Windows Phone 8? 蓝牙LE事件处理程序无一例外退出Windows Phone 8.1 - Bluetooth LE event handler quit without exception windows phone 8.1 麦克风BufferReady事件处理程序未在Windows Phone 8应用中获取 - Microphone BufferReady event handler doesnt get in windows phone 8 app App.xaml Windows Phone 8.1中DataTemplate上的事件处理程序 - Event Handler on DataTemplate in App.xaml Windows Phone 8.1 按“开始”按钮后,Web Scraping事件处理程序将卡住-Windows Phone 7 - Web Scraping Event Handler Gets Stuck after pressing the “START” button - Windows Phone 7 为Windows Phone 8.1加载页面后,长时间运行代码的最佳事件处理程序是什么? - What is the best event handler for long running code after a page is loaded for Windows Phone 8.1? Windows Phone 7或Windows Phone 8中的MouseMove事件替代方法? - MouseMove event alternative in Windows Phone 7 or Windows Phone 8? Windows服务中的事件处理程序问题 - Event Handler Problem in Windows Service 在Windows Phone 8.1中使用滑动处理程序滑动图像 - Slide image with swipe handler in Windows Phone 8.1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM