How to use XFShapeView inside xaml?

FaisalAminFaisalAmin USMember ✭✭

Hi, I am using the XFShapeView in my Xamarin.Forms project. I successfully used it in code behind. But getting error when I use it in xaml
(Failed to resolve assembly: 'XFShapeView.Forms.Plugin.Abstractions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null')
The problem probably is in namespace, but I couldn't find the correct namespace anywhere.

<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:abs="clr-namespace:XFShapeView.Forms.Plugin.Abstractions;assembly=XFShapeView.Forms.Plugin.Abstractions"
             x:Class="DbXF.Controls.CustomPicker">
    <ContentView.Content>
        <Grid>

            <abs:ShapeView BackgroundColor="Transparent"
                           BorderColor="#9b9b9b"
                           BorderWidth="2" />
        </Grid>
    </ContentView.Content>
</ContentView>

Best Answer

  • JJSKYJJSKY KR ✭✭
    edited August 2017 Accepted Answer
        <?xml version="1.0" encoding="utf-8" ?>
        <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
                     xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                     xmlns:local="clr-namespace:Test.ViewModels"
                     xmlns:controls="clr-namespace:XLabs.Forms.Controls;assembly=XLabs.Forms"
                     xmlns:xfShapeView="clr-namespace:XFShapeView;assembly=XFShapeView"
                     x:Class="Test.TestView">
    
    
        <xfShapeView:ShapeView ShapeType="Box" Opacity="1" Progress="50" IsVisible="True" BorderColor="Green" BorderWidth="7" Color="Gray" >
                            <Label Text="Test" />
                        </xfShapeView:ShapeView>
    

Answers

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Their site and samples don't show any XAML examples.

    What did the maker of the package say when you asked if XAML was even supported by their package?

  • FaisalAminFaisalAmin USMember ✭✭

    I didn't ask actually.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Well... the maker of a package is probably the best, first place to start with questions.

  • JJSKYJJSKY KRMember ✭✭
    edited August 2017 Accepted Answer
        <?xml version="1.0" encoding="utf-8" ?>
        <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
                     xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                     xmlns:local="clr-namespace:Test.ViewModels"
                     xmlns:controls="clr-namespace:XLabs.Forms.Controls;assembly=XLabs.Forms"
                     xmlns:xfShapeView="clr-namespace:XFShapeView;assembly=XFShapeView"
                     x:Class="Test.TestView">
    
    
        <xfShapeView:ShapeView ShapeType="Box" Opacity="1" Progress="50" IsVisible="True" BorderColor="Green" BorderWidth="7" Color="Gray" >
                            <Label Text="Test" />
                        </xfShapeView:ShapeView>
    
Sign In or Register to comment.