开发者

Calling Property Methods from the e.PropertyName property

开发者 https://www.devze.com 2022-12-24 19:35 出处:网络
void TheSettings_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { var settings = IsolatedStorageSettings.ApplicationSettings[StorageSettings]
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

精彩评论

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