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

How to Refresh page when Rg Popup is closed?

$
0
0

Hi,

I am opening Rg.Plugin.Popup here:

await Navigation.PushPopupAsync(new ZeeraPopupNewMerchantCategory());

and on the button I have a with a Click

When the Popup is closed from the 's Clicked and when returning to parent, how can I refresh the parent's page data which is in:

GetMerchantCategory()

This is the code in the parent which I need to run when the popup is closed..

Thanks,
Jassim


PageLifeCycleMethod when PopUp is open and closed in Xamarin forms.

$
0
0

Hi All, I am new to xamarin forms. In my app i need to show popup and need to fill value in pop Entry and after save button click i need to show those value on the behind screen of the popup, But I don't know which method will call when popup will close. Please Help

Thanks in Advance :smile:

How to solve unknown type in UWP app - Windows.UI.ViewManagement.StatusBar

$
0
0

Hi,
From what I can tell, I've got a pretty basic UWP app, but whenever I run it I get the following exception:

System.TypeLoadException was unhandled by user code
HResult=-2146233054
Message=Could not find Windows Runtime type 'Windows.UI.ViewManagement.StatusBar'.
Source=Xamarin.Forms.Platform.UAP
TypeName=Windows.UI.ViewManagement.StatusBar
StackTrace:
at Xamarin.Forms.Platform.UWP.Platform..ctor(Page page)
at Xamarin.Forms.Platform.UWP.WindowsPage.CreatePlatform()
at Xamarin.Forms.Platform.UWP.WindowsBasePage.LoadApplication(Application application)
at MyApp.UWP.MainPage..ctor()
at MyApp.UWP.My_App_UWP_XamlTypeInfo.XamlTypeInfoProvider.Activate_4_MainPage()
at MyApp.UWP.My_App_UWP_XamlTypeInfo.XamlUserType.ActivateInstance()
InnerException:

I'm using Xamarin.Forms 2.1.0.6529 in my project. I also tried downloading a sample off GitHub (https://github.com/jamesmontemagno/MyWeather.Forms) and I'm seeing the same exception. Looks like that project is using 2.0.0.6490.

So, that makes this sound like something is missing from my system? I'm running Windows 10 which I just installed yesterday.

I'm new to UWP and Xamarin, so I don't even know where to start looking. I have noticed that if I comment out the line:

LoadApplication(new MyApp.App());

the application boots. Of course, nothing is there since I'm not starting the app, but the code to init Xamarin.Forms is still running in App.xaml.cs.

Thanks,
Nick

Basic Local Storage - How to?

$
0
0

Hi,

I have seen sqlite but I am asking what if I want a simple local storage just to save one variable user_id to determine the user ID?

What's the best way yo do it so even if the user closes the app or the phone it will still be stored?

Kindly advise...

Thanks,
Jassim

Pass info to another native android App

$
0
0

Hello everybody!

I send information from application A to application B (written in Java) with values of type Int all ok, but my string values: Username and Password in application B is always null.

Code Application A:

public void MakeReport(int jobId, int jobType)
        {
            var intent = Android.App.Application.Context.PackageManager.GetLaunchIntentForPackage(AppBundle);
            if (intent is null)
                throw new NullReferenceException();

            // Set Data
            intent.PutExtra(UsernameMessage, javaUsername);
            intent.PutExtra(PasswordMessage, javaPassword);
            intent.PutExtra(JobIdMessage, jobId);
            intent.PutExtra(JobTypeMessage, jobType);

// Test All OK
            string usernameTest = intent.GetStringExtra("USER_NAME_FROM_MDO_SCHEDULE");
            string passwordTest = intent.GetStringExtra("USER_PASSWORD_FROM_MDO_SCHEDULE");
            int jobIdTest = intent.GetIntExtra("JOB_ID_FROM_MDO_SCHEDULE", -1);
            int jobTypeTest = intent.GetIntExtra("JOB_TYPE_FROM_MDO_SCHEDULE", 0);

            Forms.Context.StartActivity(intent);
        }

        #endregion

Code Application B:

@Override
 protected void onNewIntent(Intent intent) {
  super.onNewIntent(intent);
  initLoginPopup();
  String login = intent.getStringExtra("USER_NAME_FROM_MDO_SCHEDULE");
  String password = intent.getStringExtra("USER_PASSWORD_FROM_MDO_SCHEDULE");
  int jobType =  intent.getIntExtra("JOB_TYPE_FROM_MDO_SCHEDULE", 0);
  int jobId = intent.getIntExtra("JOB_ID_FROM_MDO_SCHEDULE", 0);
  loginFromMdoSchedule(login, password, jobType, jobId).start();
 }

E/EXTRAS: [JOB_ID_FROM_MDO_SCHEDULE=0]
                   [USER_NAME_FROM_MDO_SCHEDULE=null]
                   [USER_PASSWORD_FROM_MDO_SCHEDULE=null]
                   [JOB_TYPE_FROM_MDO_SCHEDULE=2]
E/END@@@@: Dumping Intent end

How to run application in landscape mode for Xamarin forms?

$
0
0

Hi All, I need a help! I have windows tablet application built in xamarin forms. Its layout has been built to display it properly in landscape mode only. But when installed on tablet and rotate screen is ON, it rotate the application in portrait mode. While building the package I selected ONLY Landscape and Landscape flipped but still it changes when screen is rotated.

Any pointers ??

Getting Error while installing nuget package xam.HtmlLabel & HtmlAgilityPac timed out after 100000ms

$
0
0

output:
Restoring packages for D:\RichaDoNotDelete\New folder\WatersouqMobApp\WatersouqApp\WatersouqApp.iOS\WatersouqApp.iOS.csproj...
GET https://www.nuget.org/api/v2/FindPackagesById()?id='HtmlAgilityPack'
OK https://www.nuget.org/api/v2/FindPackagesById()?id='HtmlAgilityPack' 8354ms
GET https://www.nuget.org/api/v2/package/HtmlAgilityPack/1.7.4
Failed to download package 'HtmlAgilityPack.1.7.4' from 'https://www.nuget.org/api/v2/package/HtmlAgilityPack/1.7.4'.
The HTTP request to 'GET https://www.nuget.org/api/v2/package/HtmlAgilityPack/1.7.4' has timed out after 100000ms.

Creating a list of Tags

$
0
0

Hi all,

what I want to do in my forms app, is show a list of tags, similar to the Tags list below this edit box. any one know of a control for this, or have any good ideas how to create the effect?


How to set a button at a fixed location on the bottom of UI using Xamarin Forms?

$
0
0

Hello guys! I need some help, I would like to set a set a button at a fixed location on the bottom of UI, how to do this using Xamarin.Forms?

How to get back to app after google login

$
0
0

Hi Everyone,

I'm trying to implement google login in my app using xamarin.auth like below

var auth = new OAuth2Authenticator("284202576320-7kgdhaa5sgvkoe03jmmcv0p8lfdma306.apps.googleusercontent.com","cAZW7uegD-h2-
                                                             tNMMf5q1UGQ","https://www.googleapis.com/auth/userinfo.email",new 
                                                             Uri("https://accounts.google.com/o/oauth2/auth"),new 
                                                             Uri("http://dev.myfav.restaurant/Account/LoginComplete"),new 
                                                             Uri("https://accounts.google.com/o/oauth2/token"),null,true)
        {
            AllowCancel = true,                
        };

but Completed event not firing and its going to web page after login :( i need to get back user to my app how can i achieve this ???? Can anyone help me on this please.

Thanks in advance

Enable NuGet Package Restore?

$
0
0

I'm using Xamarin Studio on Mac and currently only focusing on the iOS project. After having updated packages (because the compiler complained about FontAttributes not being found), I get the following build error message:

This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ../../packages/Xamarin.Forms.1.0.6186/build/portable-win+net45+wp80+MonoAndroid10+MonoTouch10/Xamarin.Forms.targets. (IslandsbankaApp)

Presumably, this is because the Android project and the WinPhone project reference version 1.0.6186, or what?
How do I "Enable NuGet Package Restore" in Xamarin Studio?

Can't resolve cornerRadius on Button for iOS 11 for xamarin forms app

$
0
0

When running a xamarin forms app on iOS 11 get an error

Can't resolve cornerRadius on Button

Works fine on android.
Would I have to write a custom renderer to set button's **clipsToBounds ** property to true or is there any other way to achieve that

WebApi and Form Model Validation

$
0
0

Hi,

I have a Xamarin.Form app, and I am consuming an ASP.Net Web WebAPI with Model State for validation in my internal models. If I got a "bad request" my API return this oJSON object:

_{
message: 'The request is invalid.',

modelState: {

    model.**Name**: [

        "The name is empty"
    ]
}

}_

So, I want to simplify my work in the UI to read that result, my question are: How can I do to use this object for display the error in my UI? or Does Xamarin Form have any helper similar to ASP.NET MVC to display automatic the error in the UI (like validator @Html.ValidationMessageFor(model => model.Name)?

Thanks!

Xamrin Forms: Custom user authentication with Azure Functions App

$
0
0

I am implementing a project using Xamrin Forms and have it pointing to an Azure Functions App. I have configured the Azure Functions App to require authentication.

I am looking into creating a custom sign in / registration form with the following standard inputs:

1) user name
2) email address
3) password

I would like to restrict users from accessing my Azure Functions until they are authenticated via my custom sign in / registration procedure. However I am not sure this is possible without using some standard authentication process like Active Directory (which uses a Microsoft Acccount) or Google / Facebook authentication. Is there a way to authenticate users using a custom sign in / registration form in an Azure Functions app? If so, how can I achieve this?

If this is possible I would be greatful if someone could point me out to samples using Xamarin Forms to achive this.

Can not resolve reference: System.EnterpriseServices.Wrapper.dll

$
0
0

I have a Xamarin Forms Solution in Visual Studio. But everytime I try to compile the iOS project I got the following error message:

Can not resolve reference: /Users/user/Library/Caches/Xamarin/mtbs/builds/QSMobil.iOS/3b412dbb137e0cd8903009453a101181/bin/iPhoneSimulator/Debug/System.EnterpriseServices.Wrapper.dll ProjectName.iOS C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets 696

I read a lot of updating my build server... But both the Mac (Xamarin Studio) and the Windows PC (VS) are up to date.
By the way it's possible to build the Android version of the app.
Maybe someone could help me?


Trying to run UWP in release mode gives an "Payload contains two or more files.." error

$
0
0

Running this app in debug mode works fine, but when I try to run in release mode, I get these errors:

Error Payload contains two or more files with the same destination path 'e_sqlite3.dll'. Source files:
C:\Users\Bob.nuget\packages\sqlitepclraw.lib.e_sqlite3.v140\1.1.8\runtimes\win10-arm\native\e_sqlite3.dll
C:\Users\Bob.nuget\packages\sqlitepclraw.lib.e_sqlite3.v140\1.1.8\runtimes\win10-x86\native\e_sqlite3.dll

I have seen other posts where some users have updated the nuget for UWP and others that have actually deleted one of the dll's, but none of these work for me; when I try to delete one, I then get an error that it can't find it, so not sure what to do. I have deleted my nuget folder and re-got them fresh but nothing seems to work.

Getting started with iOS

$
0
0

I have developed a Xamarin Forms mobile app and having it working on Android via the emulator.
I now want to test it on iOS.
Is there an article describing how to achieve this? Do I still need Apple hardware? If so I will need to go and purchase it. Will an iPad suffice?

Android, IoS and Windows

$
0
0

Im trying to build a crossplatform App for these platforms. The app needs to backup and/or copy the users files between devices. I dont really need UWP, I need Windows desktop inside Xamarin. The UWP concept seems too restrictive, particularly if you are trying to access the users documents on their desktop device. UWP just doesnt allow access to the complete documents library.

Is there any way around this?

Call Navigation.PushAsync from ViewModel

$
0
0

Hello,

I want to push a new page from a viewModel.

Can I call this method from outside the page?

Thanks in advance.
Mostafa

What approaches are available for integrating Xamarin Forms pages with existing iOS native ui app?

$
0
0

I'd like to add pages built with XF to an existing iOS app built with Xamarin. The app uses storyboards, segues and UINavigationController. So how would I go about creating a UIViewController from a XF page that I can navigate to using a UINavigationController?

There's an extension method called CreateViewController() in Xamarin.Forms.Platform.iOS but discussion thread 52710 implies that it can't be used. (Sorry, I'm not trusted to post links in the forum yet)

Comment 157431 on that discussion suggests a hack using reflection on internals. Thoughts?

Viewing all 75885 articles
Browse latest View live


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