2011-10-06 4 views
1

App.xaml (아래 참조)에 MainPage.xaml.cs에서 변경하고 싶습니다.이 작업을 수행 할 수있는 응용 프로그램 리소스가 있습니다. 만약 그렇다면 어떻게?코드에서 응용 프로그램 리소스를 변경하십시오.

App.xaml :

<!--Application Resources--> 
<Application.Resources> 
    <System:Double x:Key="spinnerAngle">0</System:Double> 
</Application.Resources> 

답변

0
// retrieve 
double spinnerAngle = (double)App.Current.Resources["spinnerAngle"] 

// set 
App.Current.Resources["spinnerAngle"] = spinnerAngle ; 
관련 문제