简体   繁体   中英

Event Handler Windows Phone 7

I'm using http://babaandthepigman.wordpress.com/2010/09/22/wp7-looping-selector/ as a timer 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?

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!
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM