XAML – Retrieve the value from the resourceDictionary in the later code

I have a Windows 10 universal application, which contains some resource dictionaries for styling, etc.
In a resource dictionary like this, I have a color MyBlue, and I want Access through the code behind. How is this achieved?

I tried .Resources [“MyBlue”], but since MyBlue is defined in a separate resource dictionary instead of directly in the page resource, it does not exist in this collection .

This is my app.xaml:











< br /> d:IsDataSource="True"/>


< /ResourceDictionary>

do you have Tried

Application.Current.Resources["MyBlue"]

I have a Windows 10 universal application which contains some resource dictionaries for styling etc.
In such a resource dictionary, I have a color MyBlue, which I want to access through the code behind. How is this achieved?

I tried .Resources [“MyBlue”], but since MyBlue is defined in a separate resource dictionary instead of directly in the page resource, it does not exist in this collection .

This is my app.xaml:











< br /> d:IsDataSource="True"/>


< /ResourceDictionary>

Have you tried

Application.Current.Resources["MyBlue"]

< p>

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2713 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.