开发者

Calling Property Methods from the e.PropertyName property

void TheSettings_PropertyChanged(object sender, 
             System.ComponentModel.PropertyChangedEventArgs e)
{
    var settings = IsolatedStorageSettings.ApplicationSettings[StorageSettings]  
                                              as Dictionary<string, string>;

    settings[e.PropertyName]= //call the method that has the same property 
                              //   name to get what the value is

    LoadData();
}

Here is What I am trying t开发者_运维技巧o do. This is for a Windows Phone 7 series App. I am trying to determine what values got changed when the user changes the settings on the settings page and just save that.


If you want to dynamically call properties, use Reflection. This example gets a value: http://www.vcskicks.com/properties.php

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜