Bug 54889 - ControlTemplate in a merged ResourceDictionary crashes app
Summary: ControlTemplate in a merged ResourceDictionary crashes app
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.4
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Chris King
Depends on:
Reported: 2017-04-10 05:31 UTC by david
Modified: 2017-11-03 14:29 UTC (History)
4 users (show)

Tags: controltemplate resourcedictionary ac
Is this bug a regression?: ---
Last known good build:

Repro project (105.98 KB, application/zip)
2017-04-10 05:31 UTC, david

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description david 2017-04-10 05:31:55 UTC
Created attachment 21367 [details]
Repro project

Repro project uploaded.

If a ControlTemplate is part of a ResourceDictionary which is merged into the app's ResourceDictionary, this causes a crash.

To see the crash in the repro project, comment out the ControlTemplate from App.xaml and uncomment the ControlTemplate in AppResources.xaml.
Comment 2 Chris King 2017-04-19 16:21:51 UTC
This doesn't reproduce for me with https://github.com/xamarin/Xamarin.Forms/pull/877. What exception were you seeing? Can you add a stack trace?
Comment 3 Chris King 2017-06-20 15:31:49 UTC
We're closing as haven't heard back from you but if it's still an issue please ensure the bug reproduces on the latest version of forms and reopen the issue.
Comment 4 ksemenenko 2017-11-03 14:29:29 UTC
In Xamarin.Forms and I have the same issue.
Moreover, I do not receive resources from my ResourceDictionary.
No templates, no styles, nothing.
I see that dictionaries are created but they are completely empty.