Bug 27863 - 1.4.0 introduced a bug with ValueConverters in resource dictionary referenced in the resource dictionary can't be found
Summary: 1.4.0 introduced a bug with ValueConverters in resource dictionary referenced...
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-03-10 22:44 UTC by Shane
Modified: 2015-05-26 07:42 UTC (History)
5 users (show)

Tags: resourcedictionary xaml AC
Is this bug a regression?: ---
Last known good build:

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 Shane 2015-03-10 22:44:03 UTC
This file was untouched and if I revert to 1.3.5 it works fine. I've clipped everything else but the important bit.
Thread here: http://forums.xamarin.com/discussion/comment/109093/#Comment_109093
Workaround for now is to create static instanced of the converters and reference them by {x:Static} in the meantime.

System.Exception: Position 35:36. StaticResource not found for key DOBLabelConverter

1.4.0 introduced a bug where if you define a converter in your xaml resource dictionary, and then reference it below (in my case a viewcell datatemplate). It can't find the converter.

         <converters:DOBLabelConverter x:Key="DOBLabelConverter"/>
         <DataTemplate x:Key="ListDataTemplate">
                    <AbsoluteLayout Padding="5, 5, 5, 5">
                        <Label Text="{Binding Name}"

                        <RelativeLayout AbsoluteLayout.LayoutBounds="42,25,1,25"

                            <Label Text="{Binding DateOfBirth, Converter={StaticResource converters:DOBLabelConverter}}"
                                   RelativeLayout.XConstraint="{ConstraintExpression Type=Constant, Constant=0}"
                                   RelativeLayout.YConstraint="{ConstraintExpression Type=Constant, Constant=5}"/>
Comment 1 marko.lazic88 2015-03-27 11:33:34 UTC
I confirm the issue. It is not only happening for Converters, as the code bellow doesn't work as well (before updating to Xamarin Forms 1.4.0 everything was working just fine).


          <DataTemplate x:Key="SimpleMessageTemplate">

          <custom:NotificationMessageDataTemplateSelector x:Key="NotificationMessageDataTemplateSelector" SimpleMessageTemplate="{StaticResource SimpleMessageTemplate}" />


My guess is that there is an issue with any StaticResource reference to element defined in the same ResourceDictionary.
Comment 2 Stephane Delcroix 2015-05-26 07:42:21 UTC
This issue can't be reproduced anymore in our master.