Bug 36082 - XamlCompilation throws error when using custom properties in XAML
Summary: XamlCompilation throws error when using custom properties in XAML
Status: RESOLVED DUPLICATE of bug 36013
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-11-20 03:00 UTC by Arthur
Modified: 2015-11-23 05:10 UTC (History)
4 users (show)

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


Attachments
testcase (5.89 MB, application/octet-stream)
2015-11-20 03:10 UTC, Arthur
Details


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:
Status:
RESOLVED DUPLICATE of bug 36013

Description Arthur 2015-11-20 03:00:13 UTC
When a custom enum property in a class derived from a Forms Control is referenced in XAML, the compiler will throw an error when using XamlComplilation.

Example:

public enum StyleType
{
    Italic,
    Bold
}

public class StyledLabel : Label
{
    public StyleType FontStyle { get; set; }
}

in XAML

<local:StyledLabel Text="{Binding ID}" FontStyle="Bold"/>

Error: Enum value not found for Bold

When XamlCompilation is disabled, the code compiles and works as expected.
Comment 1 Arthur 2015-11-20 03:10:16 UTC
Created attachment 13910 [details]
testcase
Comment 2 Stephane Delcroix 2015-11-23 05:10:18 UTC

*** This bug has been marked as a duplicate of bug 36013 ***