Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
A ResourceDictionary that is merged with another one is reporting only its resources for its Count.
For example, if Application.Resources has a single resource and is merged with another ResourceDictionary with also one resource, App.Current.Resources.Count is returning 1.
This appears to be a regression that started in Forms 2.3.4-pre1.
### Steps to Reproduce
1. Run the attached project
### Expected Results
The Button style is defined in App.xaml while the Label style is defined in TestDictionary.xaml. The second Label shows the result of App.Current.Resources.Count and should return 2.
### Actual Results
Even though both styles are working as expected, App.Current.Resources.Count returns 1.
### Regression Test
Created attachment 21156 [details]
I talked with the team and this is an intentional change. Previously Count would return the sum of resources including other merged dictionaries, but the enumerator only returned the content of the referenced dictionary.
Starting with Forms 2.3.4, the behavior is now consistent and both Count and the enumerator return only the items from the referenced ResourceDictionary.