Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all 77050 articles
Browse latest View live

Development platform hangs very often

$
0
0

My development environment is visual studio community 2017 running on Windows 7, on a "healthy" machine. All updates have been applied to both windows and visual studio. I am developing Xamarin forms for IOS. I have a new MacBook which is the build agent.

My app runs, but I find that when I stop debugging, make a code change, and rerun, visual studio hangs about 1 out of 4 tries. I have to go to task manager and kill it and then restart. Very time consuming and frustrating.

Is there a process I need to follow to make this more reliable?


How to approach push notifications on Xamarin.Forms project?

$
0
0

So we are working on a pcl project and have our UI set in a page inside the PCL. There is a scenario where our client wants some information to be sent as a push notification. We already have our UI in place and our backend too. We are using Azure to store data and have successfully configured WAMS. However we are scratching head on how to make push notifications work on Android without creating a separate page layout / controls that are android specific.

tl;dr - how do we use the PCL page UI elements to trigger push notifications on an Android device?

Carousel View Custom Renderer Alternative?

$
0
0

Since there is not a Carousel View just yet (and Xamarin doesn't sound convinced to make one), has anyone made a custom renderer that can share some code on how to make a swipable carousel?

OCR library for Xamarin.Forms

$
0
0

Hi all,

I was wondering if someone has found a way to implement OCR in a Xamarin.Forms app to be distributed to iOS, Android and Windows Phone 8.
This is my Research so far, but I will require to expend $400:

Has someone found an open source API for Xamarin iOS and Android?
Is there a PCL already created for this?

Thank you so much for your time.

Regards

WinPhone Device CS0012: The type 'CultureInfo' is defined in an assembly that is not referenced.

$
0
0

I have a problem that only occurs when starting a Windows Phone app on a device where I'm using code from this forms example: https://developer.xamarin.com/guides/xamarin-forms/advanced/localization/

Only when running on a Windows Phone device I get this error using CultureInfo, but not on a emulator. Every evaluation of CultureInfo related expressions result this:

error CS0012: The type 'CultureInfo' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Globalization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

So even the simple CultureInfo.CurrentCulture will evaluate to this error. It's actually not leading to an exception though untill a CultureInfo object is passed into the ResourceManager for retrieving a translation.

I feel my lack of understanding how the PCL's and binding works exactly is impeding me to find a solution here. I've reproduced the problem in a small project which can be found on: https://github.com/ferrydeboer/WPCrashForms

I'd like to know if somebody can repro this problem with the WinPhone project on a Windows Device. The crashes occur both on Windows Phone 8.1 and Windows 10 devices.

Forms not clearing (and so leaking) UI elements - e.g. Labels and BindablePropertyContext - on Pop

$
0
0

We're experiencing memory leaks in our Xamarin.Forms Android application, and I've been investigating using Profiler. This has led me to running Profiler against a very basic Forms app.

The very basic Forms app is based on the simple List->Detail template project which is available in Visual Studio For Mac.

All it does is navigate from a list page to a details page using the inbuilt navigation stack.

    async void OnItemSelected(object sender, SelectedItemChangedEventArgs args)
    {
        var item = args.SelectedItem as Item;
        if (item == null)
            return;

        await Navigation.PushAsync(new ItemDetailPage(new ItemDetailViewModel(item)));

        // Manually deselect item
        ItemsListView.SelectedItem = null;
    }

Going from List->Details->List 11 times and then taking a snapshot in Profiler reveals that we've got 372 BindablePropertyContext objects and 22 Labels (among other objects) created and not released:

I have tried setting Content to null and BindingContext to null in the OnDisappearing event of the Details page, and also putting an explicit GC.Collect() in the OnAppearing of the List page. Neither of these fix the problem.

This is not acceptable for an app which is intended to run continuously on a device!

So is there a core memory leak in Forms, or am I missing something?

I'm using Xamarin.Forms 2.5.0.121934

Application.Current?.MainPage?.DisplayAlert("") What does ? do here

$
0
0

While implementing a permission plugin in Xamarin app saw this line of code
As per my understanding, it works same as

Application.Current.MainPage.DisplayAlert("");

So what's the use of "?" here

Is it possible to use a Page renderer in the UWP project to modify the title bar?

$
0
0

I would like to add an AutoSuggestBox in the title bar area for certain pages, not all pages. Can a page be defined in the PCL and a custom renderer used to modify only the title bar in the UWP project and preserve the rest of the page layout from the PCL?


How to make like this animation on xamarin forms?

$
0
0

here current sale is a button,when a user select any list item then it will add quantity to this item to current sale square button

how to create this animation with label center of the square?

app.ios doesn't work any more

$
0
0

I have this problem,Im using Visual Studio Mac.
I debug my iOS app in my iPhone, but after a moment, the app in iPhone doesn't work, the debug process in Visual Studio goes well without any error, but iPhone doesn't open the app any more,
It happened to me for every projects of mine.

iOS Native Linking Error

$
0
0

When I attempt to run my xamarin forms app using the iOS simulator I'm getting the following errors around linking. I'm using a new dll that I created. The simulator is paired with a mac mini that is running macOS High Sierra Version 10.13.3, Xcode 9.1, and Visual Studio for Mac Enterprise 7.4. I was curious if anybody had any ideas about what was causing these errors?

Severity Code Description Project File Line Suppression State
Error Native linking error: framework not found /Users/dwighthyde/Library/Caches/Xamarin/mtbs/builds/UCH.MHC.Mobile.iOS/febaa3b698a046262026a17f2d96a20b/obj/iPhoneSimulator/Debug/mtouch-cache/x86_64/registrar.o UCH.MHC.Mobile.iOS

Severity Code Description Project File Line Suppression State
Error Native linking failed. Please review the build log. UCH.MHC.Mobile.iOS

Severity Code Description Project File Line Suppression State
Error Native linking failed. Please review the build log and the user flags provided to gcc: -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/dwighthyde/Library/Caches/Xamarin/mtbs/builds/UCH.MHC.Mobile.iOS/febaa3b698a046262026a17f2d96a20b/obj/iPhoneSimulator/Debug/Entitlements.xcent UCH.MHC.Mobile.iOS

List View Shrink to Contents

$
0
0

I had a stack layout with two labels side by side. In this case the content page is made as small as possible.

When I change the left column from a label to a list view it drastically increases the size of each row in both height and width to take up as much space as possible.

Similar to the two label version I would like the list view version to shrink to be as small as possible in both height and width so it is just big enough to encompass all of its contents. How do I do this?

How to get app bundle version information programatically in xamarin forms?

$
0
0

I need to pull out the bundle version set in iOS as well as the version number from Android.
How possible for me to access all this bundle related staff from Xamarin Forms?

Frame doesn't consider CornerRadius on Windows Phone and UWP

$
0
0

Hello,

I'm facing a problem with rounded corners. In a page in my PCL project I've a Frame with CornerRadius set to 20. On iOS and Android, no problems, they appears as I want but on UWP and WP Frame stays with square corner...


Is it a known bug or limitation ?

Thanks for your help!

How to fix the build error "java.lang.OutOfMemoryError"?

$
0
0

Hi all,

everything was working fine with my XF app, until changed computer. After reinstalling all my programs etc, when I build the app i get this error:

Error java.lang.OutOfMemoryError. Consider increasing the value of $(JavaMaximumHeapSize). Java ran out of memory while executing 'java.exe -jar "C:\Program Files (x86)\Android\android-sdk\build-tools\25.0.3\lib\dx.jar" --dex --no-strict --output obj\Debug\android\bin R:\VeloGuide\App\VeloGuideApp\VeloGuideApp.Android\obj\Debug\android\bin\classes.zip "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v8.0\mono.android.jar" obj\Debug\lp\42\jl\arch-core-common.jar obj\Debug\lp\43\jl\arch-lifecycle-common.jar obj\Debug\lp\44\jl\bin\classes.jar obj\Debug\lp\45\jl\bin\classes.jar obj\Debug\lp\47\jl\bin\classes.jar obj\Debug\lp\48\jl\bin\classes.jar obj\Debug\lp\49\jl\bin\classes.jar obj\Debug\lp\50\jl\bin\classes.jar obj\Debug\lp\51\jl\bin\classes.jar obj\Debug\lp\52\jl\bin\classes.jar obj\Debug\lp\53\jl\bin\classes.jar obj\Debug\lp\54\jl\bin\classes.jar obj\Debug\lp\55\jl\bin\classes.jar obj\Debug\lp\56\jl\bin\classes.jar obj\Debug\lp\57\jl\bin\classes.jar obj\Debug\lp\58\jl\bin\classes.jar obj\Debug\lp\59\jl\bin\classes.jar obj\Debug\lp\6\jl\formsviewgroup.jar obj\Debug\lp\60\jl\bin\classes.jar'

This solution worked:
https://stackoverflow.com/a/36835891

but the first thing i wonder is: why did i start getting this error in the first place? Different JDK versions?

The second problem is that after I fix the build error, I can't deploy to my android phone anymore.
The build is successful, but I get the "There were deployment errors. Continue?" alert box.

I attached my Output window log. Please help, it must be some configuration, as I had to reinstall everything on a new PC.


Cross Platform App(Xamarin.Forms) Applet is missing

$
0
0

I have installed visual studio 2017 enterprise edition windows 10. I also installed below tools.
.NET Development Development
Universal WIndows Platform development
ASP.net and web development
Mobile development with JavaScript

Since Cross Plateform App(Xamarin.Forms) is not avaliable, I am not able to follow xam-120 class and unable to create Cross Platform App(Xamarin.Forms). I am new to Xamarin, it's very hard to follow calss when you don't have same tools available as instructed in te class.

In my C# Cross Platemform, I have only two templates available as below.
1) Mobile App(Xamarin.Forms)
2) UI Test App(Xamarin.UITest | Cross-Platform)

Thank you.

FFImageLoading

$
0
0

Hi,

When the list of images is refreshed, infinite scrolling, some of the images load and then fade away. The array of images is has the expected number but, they are not being displayed.

I have 1st contacted Microsoft about this isssue and they have pointed me to FFImageLoading as the possible problem.

"'I've been in constant communication with some of our Escalation Engineers in regards to this issue. We were able to determine that the problem is occurring when the application is trying to set the HightRequest. On the DashboardPage.xaml.cs file -Line 162, If you change the img.HightRequest to a fix Hight, the issue does not occur when refreshing.

I am not sure if this bug is coming from our Xamarin Framework or if this is an issue with the FFImageLoading.

I did some research on the FFImageLoading component and noticed that an issue was submitted to their GitHub. Another user seemed to be having a very similar problem but with a ListView.
github DOT com luberda-molinet FFImageLoading issues 974"

Have you seen this issue before and do you have any suggestions for me?

Best,

I can't generate IPA from Visual Studio

$
0
0

I'm trying build my iOS application from Visual Studio for generate an IPA file, but I'm not having success.I set it up my provisioning profile, with my AppID etc, and when I try compile iOS application, gives following error:

"D:\AppNivel_Bkp_14032018_1450h\AppNivel\AppNivel.iOS\AppNivel.iOS.csproj" (default target) (1) ->
(_CodesignAppBundle target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1930,3): error : /Users/user122749/Library/Caches/Xamarin/mtbs/Users/carlo/Desktop/IOS/AppNivel.iOS.app: unknown error -1=ffffffffffffffff
"

Calendar - Xamarin Forms

$
0
0

I am using Xamarin Forms, is there any component that i can use to open the Calendar application on the device in iOS and UWP?

Or dependency service.
Thank you in advance.

No auto generated events from .xaml file in .xaml.cs file

$
0
0

Hello everyone,

I have a test.xaml file and his corresponding test.xaml.cs file in my common xamarin project.
When I add a "Clicked='MyHandler'" option on a tag in my test.xaml file, VS doesn't generate the code for the event in test.xaml.cs file...

I'm really stuck with this issue...


Viewing all 77050 articles
Browse latest View live


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