We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Just trying to create QRCode in Xamarin.Forms

I have reviewed the sample project for Xamarin.Forms and it seems to work fine.

I have tried to take the code from the sample and get it into my project and it just shows the gray background box with no QR Code.

Ideally, I'd like to setup the barcode control in XAML and bind the Text property to my data source. Here is what I have tried to setup in XAML:


            <sf:SfBarcode x:Name="barcode"
                Text="123456789"
                TextFont="Micro" 
                Symbology="QRCode"
                BackgroundColor="Pink" 
                XDimension="6"
                HeightRequest="200" WidthRequest="200" />


I even tried adding a new form to my app, pasting the contents of the sample page and doing some minor tweaks to it so it would run but I get the same results again. Not sure if maybe there is something in the SamplePage that is setting up something I need or not. 

Anyone out there know what I should try next?

Carl



1 Reply

NM Nijamudeen Mohamed Sulaiman Syncfusion Team September 11, 2015 06:08 AM UTC

Hi Carl,


Thanks for your interest in Syncfusion Products.

We have analyzed your query and found that XDimension property has used wrongly in “
SfBarcode. XDimension is a property of “QRBarcodeSettings”. Please find the modified code for QRCode.

Code Example:


<barcode:SfBarcode x:Name="barcode"

 Grid.Row="2" BackgroundColor="Gray"

 Text="http://www.wikipedia.org"

Symbology="QRCode">

     

       <barcode:SfBarcode.SymbologySettings>

        <barcode:QRBarcodeSettings x:Name="settings"  XDimension="10"/>

       </barcode:SfBarcode.SymbologySettings>

   

</barcode:SfBarcode>



Note: http://help.syncfusion.com/xamarin/essential-barcode/getting-started


If the provided information does not meet your requirement, could you please provide us more information along with simple issue reproducing sample and its replication procedures? It will be helpful for us to analyze on it and provide you a possible solution.

Please let us know, if you have any queries.

Regards,
Nijamudeen M.


Loader.
Up arrow icon