Bug 26680 - Creating ConstraintExpression in ResourceDictionary doesn't work with XAML
Summary: Creating ConstraintExpression in ResourceDictionary doesn't work with XAML
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.1
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-02-03 07:30 UTC by Tibor Ebner
Modified: 2016-04-08 19:09 UTC (History)
6 users (show)

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 Tibor Ebner 2015-02-03 07:30:48 UTC
It seems that creating ConstraintExpression in ResourceDictionary doesn't work with XAML anymore:

            <ConstraintExpression x:Key="zero"
                Constant="0" />
            <ConstraintExpression x:Key="fillWidth"
                Factor="1" />
            <ConstraintExpression x:Key="fillHeight"
                Factor="1" />
            <local:MapConverter x:Key="mapConverter" />     

When I try to reference any of the static resources (like RelativeLayout.XConstraint="{StaticResource zero}") I get a 'No property of name RelativeLayout.XConstraint found' XamlParseException. This has worked in Forms v1.2 then broke in v1.3.1.
Comment 1 Abhishek 2015-02-12 06:52:49 UTC
I have tried this issue and unable to reproduce this reported behavior at my end.

Steps to Reproduce:
1. Create a sample Xamarin.Forms(PCL).
2. Add xaml Page and copy the above code place it inside <ContentPage></ContentPage>
3. Call the Xaml page in App.cs 
4. Run the application on the Emulator.
5. Application launch successfully without any exception.

Screencast: http://www.screencast.com/t/maHqbretG

Please let me know if I have missed any steps to reproduce this issue.

If you are still getting this issue could you please attach sample test with the bug so that we can reproduce this issue at our end.

Also please provide Exception Output, IDE log, Build Info
IDE Log via Help->Zip Xamarin Logs.
Build Info via Help-> About Microsoft Visual Studio.

Build Info:
Xamarin.Forms :
Xamarin.Forms :
Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.50938

Xamarin (9f3e552)
Xamarin.Android (49a04b966feb40dfdba49d57ba16249b66d606a6)
Xamarin.iOS (3b3ef438017c7ecf486defa9e01567a5f2b3cb2a)
Xamarin.iOS Unified Migration   1.0
Comment 2 Samantha Houts [MSFT] 2016-04-08 19:09:00 UTC
Thank you for your bug report. As we have not received the information requested, we cannot properly triage your bug and are marking it resolved.

Warm regards,
Xamarin Forms Team