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

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...



Barcode Scanner - Zxing Mobile

$
0
0

Hi developers,

I have a sample Xamarin Forms application and i'm using Zxing.Net.Mobile.
I can read QR Codes, ITF Small codes but, I can't read barcodes that has 44 digits.
My ideia is with app, read bank slip some figure below:

How do this?

It is my simples code:

`
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}

    async private void openScanner_Clicked(object sender, EventArgs e)
    {
        var opts = new ZXing.Mobile.MobileBarcodeScanningOptions
        {
            PossibleFormats = new List<ZXing.BarcodeFormat> { ZXing.BarcodeFormat.QR_CODE, ZXing.BarcodeFormat.ITF,
                ZXing.BarcodeFormat.All_1D, ZXing.BarcodeFormat.EAN_13, ZXing.BarcodeFormat.CODE_39, ZXing.BarcodeFormat.CODE_128,
                ZXing.BarcodeFormat.PDF_417, ZXing.BarcodeFormat.UPC_EAN_EXTENSION  
            }
        };

        opts.TryHarder = true;
        var barcodeReader = opts.BuildBarcodeReader();
        barcodeReader.Options.AllowedLengths = new[] { 44 };

        ZXingScannerPage scanPage = new ZXingScannerPage(opts);
        ITFReader
        scanPage.OnScanResult += (result) => {

            Device.BeginInvokeOnMainThread(() => {
                Navigation.PopAsync();
                DisplayAlert("Scanned Barcode", result.Text, "OK");
            });
        };

        await Navigation.PushAsync(scanPage);
    }
}

`

PushModalAsync on iOS results in Entry fields being IsHitTestVisible = False?

$
0
0

My root page is a ContentPage. I set it like this in App.xaml.cs:

    public App ()
    {
        InitializeComponent();

        MainPage = new MainPage();
    }

when i detect a user is just authenticated for the first time I forward them to a registration screen that I want to be modal using the following code:

        var editNamePage = new RegisterNameEditorPage();
        await Navigation.PushModalAsync(editNamePage);

The navigation is successful and the screen works as designed when running in the Android emulator and a physical Android device. However when I run in an iOS simulator the fields do not take any user input. It's like they are hit test invisible. Basically my app is bricked. Can't do anything. This ONLY happens in iOS simulator (havent tried it on a physical iOS device). But it works correctly on Android simulator and physical device.

Airwatch SDK with Xamarin Forms

$
0
0

I'm trying to setup the airwatch SDK from this link: components.xamarin.com/gettingstarted/awsdk for use with Xamarin forms. The link has instructions for setting it up for android and IOs. Is it compatible with Xamarin.Forms? Does anyone have any examples with it working with forms?

Thanks,

Airwatch and application installation

$
0
0

I have a client that wants to use our mobile application but they seem unable to install it to their devices via Airwatch. Would my application need the Airwatch SDK or is it a setting on their end? Thanks in advance

Xamarin Forms: VMWare Air watch integration

$
0
0

We are using Xamarin Forms for Android and iOS. Is there documentation / steps to achieve the VMWare Airwatch SDK integration for Xamarin Forms on Android and iOS.
Thanks.

CarouselPage or CarouselView

$
0
0

I need to have a custom view in Xamarin.Forms. I need the header to have button in the middle of it, not a toolbar button on the side. The page also needs to change between content pages. Currently I am trying to get the CarouselPage to work since it has the ability to load content pages whereas the CarouselView does not. Also, I cannot use the latest version of Xamarin.Forms (2.5.x) because I must support Android 6 (Marshmallow), so I'm stuck with 2.4.0.282. I have looked at many custom alternatives, but they all require Android 7 or higher which will not work, also, sometimes they say they'll support a lower version of Android, but something they reference requires a higher version.

Any thoughts on how to accomplish this task?

Thanks,
Daniel

xam.plugin.media nug for take photo crashed in xamarin ios application, after updating xcode to 9.2v

$
0
0

Hi everyone, In my app have a feature like take photos for profile picture. I am using xam.plugin.media 3.02v for taking photos, it's working fine but after updating my xcode to 9.2v it's getting crashed. After taking photo and click "use photo" tab in my ipad, app is crashed. I have used 'NSCameraUsageDescription' and 'NSPhotoLibraryUsageDescription' permissions but still getting crashed. Please suggest any idea for crashing of app. Thanks in advance.


Intelligense doesnt work properly when using the ".NET standard" Code sharing strategy.

$
0
0

So I want to learn xamarin forms, but there are bugs like this everywhere.

I go and select new project > cross platform >cross platform app (xamarin forms) > select blank template > ui tech: xamarin.forms and code sharing strategy: .NET standard

So, I go to the mainfile xml to generate a new button.

I can generate some code like this
<Button Text="dd"
Clicked=""

but when Im writing "clicked", intelligense should give me the option to autogenerate this code
Clicked="Button_Clicked"

so that function gets created on the background.

This works properly on the shared project strategy, but on .net standard strategy it doesnt work.

Is there something that can be done about this?

StreetView Xamarin Forms

$
0
0

I am using this [Xamarin Forms Library of Google maps: https://github.com/amay077/Xamarin.Forms.GoogleMaps/. Now I have properly integrated it on my project. My question is, is there a way I can include streetview on my project or at least open the googlemaps streetview on the device when a button is clicked. I can't seem to find a good tutorial for this. I'm quite new to xamarin. Thanks in advance

How to detect iOS smart invert

$
0
0

How can I detect when a user enables smart invert on iOS in Xamarin.Forms? And how can I tell iOS not to invert my app that I already set it?

Debugger not working

$
0
0

Hi all together,
i create a new solution in Xamarin.Forms.
As i select UWP as StartProject the Debugger is missing all BreakPoints.
In Android the Debugger is working as expected.
Any ideas?
Thanks
Peter
'

How can we make Responsive Web Design in Mobile By Clling WebView ?

$
0
0

I want to Call My Website By Webview and I have to Remove Unwanted Stuff of Website in Mobile Is it Possible to Do.So that it can be Responsive in Mobile

PRISM + Unity Container - Link sdk and user assemblies

$
0
0

Have anyone already configure the linker to work properly with the Microsoft Unity container?
I have an app that is currently in production but at for now i've only use "SDK assemblies only". So i'm trying to reduce the size of this app and linker is the best option but i'm not getting to make it work.

I've already make a test: created a new Prism.Unity app, with the Prism Template Package and the only change that i made was set link to full mode...the app crashes as well.

The error message:

Unhandled Exception:
08-29 13:52:02.485 E/mono    (12194): System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Practices.Unity.ArrayResolutionStrategy' threw an exception. ---> System.InvalidOperationException: Sequence contains no matching element
08-29 13:52:02.485 E/mono    (12194):   at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00011] in <b5bd9d990a0b4733885e90ca5ec6c0fb>:0 
08-29 13:52:02.485 E/mono    (12194):   at Microsoft.Practices.Unity.ArrayResolutionStrategy..cctor () [0x00014] in <95410a6f72e5460987abb52dc3238a18>:0 
08-29 13:52:02.485 E/mono    (12194):    --- End of inner exception stack trace ---
08-29 13:52:02.485 E/mono    (12194):   at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
08-29 13:52:02.485 E/mono    (12194):   at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <183b200ee49746d48fc781625979428e>:0 
08-29 13:52:02.485 E/mono    (12194):    --- End of inner exception stack trace ---

Isolated Background Services in Xamarin Android

$
0
0

Hello everybody, I have problem initiating an isolated services, sometimes known as Long Running Services. The process crashes on start. The same process starts and operates with no issues if run without IsolatedProcess attribute.
So I have discovered the issue is with the top part of the code, please look at the code below;

namespace AppClient.Droid
{
    [Service
        (Name= "com.Location.App.SimpleService", 
        IsolatedProcess = true, 
        Icon = "@drawable/icon", 
        Process = "com.Location.App.SimpleService", 
        Label = "SimpleService")]
    public class SimpleService : Service
    { ...........}

Please note that com.Location.App is my package name set into Manifest xml file - <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.Location.App"

I initiate process from MainActivity during application load and the service should remain running even if UI of the application is closed.

I will appreciate for your time.


Bind bool in ControlTemplate Binding

$
0
0

I have successfully implemented Control template for my app and added Commands as Template binding.
But now i need to show busy indicator in control template. i have IsBusy bool in my view model base.
When i try to create bool or Boolean Bindable property in my Main Page it throws errors.
I am following xamarin "Binding from a ControlTemplate"

public static readonly BindableProperty IsBusyCommandProperty = BindableProperty.Create("IsBusyCommand", typeof(bool), typeof(MainPage), null);

Error comes from bindable property

System.TypeInitializationException: The type initializer for 'Myproj.Views.Navigation.MainPage' threw an exception. ---> System.ArgumentException: Not a valid default value

iOS abstraction naming

$
0
0

What's the preferred way to name iOS abstractions? Let's say I have a iOS-service of some sort. It makes sense to prefix it with iOS, but to follow the c# conventions I should case it like IosService, but that looks like an interface.. What do you guys usually do? Suppress the warning, follow the c# convention, or some other variant?

iOS App Closing Event

$
0
0

Hi
Is there an event fired when an iOS app closes, which I could use to consume an api call?
I don't want to make the api call when the app enters the background by pressing the home button.
Only want to call it when a user swipes the app off/ force closes.

thank you in advance

While going to build the .Driod project of Xamarin forms got "The "Javac" task failed unexpectedly"

$
0
0

Due to version conflict I did Uninstall and then Reinstall all of the NuGet Packages in .Droid and Portable project accordingly.
The version conflict error is gone but get 1 error :
[
The "Javac" task failed unexpectedly. System.UnauthorizedAccessException: Access to the path 'C:\Users\a585113\Documents\Visual Studio 2015\Projects\WeatherApp4\WeatherApp4\WeatherApp4.Droid\obj\Debug\android\src\mono\android\support\v7\internal' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator1.AddSearchableDirsToStack(SearchData localSearchData) at System.IO.FileSystemEnumerableIterator1.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
at Xamarin.Android.Tasks.Javac.GenerateResponseFile()
at Xamarin.Android.Tasks.Javac.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
]

How to resolve it?

Attached The Screen shot below, click on icon to check.

Is there any possibility to replace the Master detail Page with Detail page using Xamarin forms.

$
0
0

I am new to Xamarin, Can anyone please help me to replace the Master detail Page with Detail page. Thanks in Advance

Viewing all 77050 articles
Browse latest View live


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