Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

MarkupExtension not found

$
0
0

Hi there,

Im trying to use the "ImageResourceExtension" to link embedded images from a Xamarin.Forms UI made in XAML.

If i try to set the Image source from code it works but not from XAML.

`
<?xml version="1.0" encoding="UTF-8"?>

<ContentPage.Content>  

    <Grid x:Name="GridMenuLateralIzq">

        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>

        <Image Source="{local:ImageResource SIMA.Core.Assets.Images.train-icon.png}"
               Grid.Row="0"
               Grid.Column="0"
               x:Name="ImageMenu"/>
        <Label Text="{sis:Math.PI}"
               Grid.Row="0"
               Grid.Column="1"/>


    </Grid>


</ContentPage.Content>


`

I imported two namespaces in the view, one of them is the mscorlib and nor works.

Part of the stacktrace:

    [MonoDroid] UNHANDLED EXCEPTION: Xamarin.Forms.Xaml.XamlParseException: MarkupExtension not found for sis:Math.PI
    [MonoDroid]   at Xamarin.Forms.Xaml.MarkupExtensionParser.Parse (System.String match, System.String& remaining, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0 
    [MonoDroid]   at Xamarin.Forms.Xaml.MarkupExpressionParser.ParseExpression (System.String& expression, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0 
    [MonoDroid]   at Xamarin.Forms.Xaml.MarkupNode.ParseMarkup () [0x00000] in <filename unknown>:0 
    [MonoDroid]   at Xamarin.Forms.Xaml.MarkupNode.<.ctor>b__0 () [0x00000] in <filename unknown>:0 
    [MonoDroid]   at System.Lazy`1[System.Object].InitValue () [0x00000] in <filename unknown>:0 

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>