Reputation: 89
there are some styles declared in the .xaml page of my project inside PhoneApplicationPage.Resources tag.
How can i access these styles in the code behind in windows phone 8
<phone:PhoneApplicationPage.Resources>
<Stlye x:key="Mystlye" TargetType = "Button">
.....
</Style>
</phone:PhoneApplicationPage.Resources>
Now i want to access this Mystlye in codebehind... how to do that?
Upvotes: 0
Views: 2372
Reputation: 860
<Application.Resources>
) use :Application.Current.Resources["MyResources"]
<ApplicationPage.Resources>
) use :Resources["MyResources"]
Upvotes: 2