Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generic.xaml xaml compilation gives error WMC0610 (XBF generation error code 0x3e9) on control style

Getting the following error when compiling XAML in a library:

Themes\Generic.xaml(35,12): XamlCompiler error WMC0610: XBF generation error code 0x03e9.

The XAML code it's failing on (line 35) is:

<Style TargetType="annotations:CanvasAnnotationItem" xmlns:annotations="using:ACME.Controls.CanvasAnnotation">

No extra info to help with the error.

like image 791
Shahar Prish Avatar asked Aug 26 '15 16:08

Shahar Prish


1 Answers

For some reason, the XAML compiler does not know how to handle that local namespace (the one defined directly on the style). Moving it up to the top of the file solves the issue:

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:annotations="using:ACME.Controls.CanvasAnnotation"
    xmlns:local="using:ACME.Controls">

And in the element itself:

<Style TargetType="annotations:CanvasAnnotationItem">
like image 54
Shahar Prish Avatar answered Nov 15 '22 11:11

Shahar Prish