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

Pass binding to ConverterParameter

$
0
0

I'm currently trying to modify a list of commands being passed to my view from my view model if the item in the list contains a certain value, however the ConverterParameter doesn't seem to recognize what is being passed to it. Below is what I have inside of the ListView DataTemplate:

<MyView Items="{Binding Path=BindingContext.Commands, Source={x:Reference Name=ExamplePage}, Converter={converters:MyItemsConverter}, ConverterParameter={Binding .}}">

Is it possible to set multiple bindings for a converter or pass a binding to the ConverterParameter?


Signature / Canvas component for Android/iOS/UWP

$
0
0

Hi @all!

I´m searching and searching the whole internet, and can´t get it done: i want something like the signature pad, but it has to work also with the UWP platform.
Is there any control / view / component out there which i can use?
The xamarin.controls.SignaturePad.Forms doesn´t work with UWP :-(

Greetings & thanks for every help!
Thomas

StripeView in Xamarin Forms

$
0
0

I did a little research and it seems braintree and stripe are suitable for app payments.
braintree has no official xamarin bindings but there's a Stripe component by Xamarin for Android and iOS.
is it possible to use this component in Xamarin.Forms (and it's StripeView UI) ?

posible stream live audio/video Chat ?

$
0
0

How to Stream live audio/video stream in Xamarin Platform Any Idea.Please Give Any Example

Listview Column

$
0
0

Hi Friends,

I have to listview with 2 columns in Xamarin forms. In first column, i have to show Image and in 2nd column, i have to show text related to that image. Can you please provide me the Xmal code for the requirement.

Thanks,
Prashant Nimbalkar

Touch Events in Xamarin.Forms?

$
0
0

I'm using a TabGestureRecognizer to make an image behave like a button. (See below) I have two versions of this image (back_button_up.png and back_button_down.png). I want to swap the images on "Touch Start" and "Touch End". How can I accomplish this in XF directly? If I was working in one of our mobile websites, I would simply use the "ontouchstart" and "ontouchend" events. What's the XF equivalent?

var img = new Image() { Source =ImageSource.FromResource("MyNameSpace.Images.back_button_up.png"); };
var tgr = new TapGestureRecognizer();
tgr.Tapped += tgr_Tapped;
img.GestureRecognizers.Add(tgr);

I am trying to implement remote notification using GCM

Visual Studio restarting when deploying to windows phone 8.1 device

$
0
0

Newly I see a strange behavior of my Xamarin Forms projects: Building and deploying apps to a Windows Phone 8.1 device (Debug Mode, ARM) results in stopping and restarting Visual Studio 2015 in about 80% of the trials. Deploying to the winphone 8.1 emulator is OK. Deploying to the other platforms (Android, IOS, UWP) works without a problem to emulators and devices.
Messages from VST: "Visual Studio stopped working... Trying to find a solution... Visual Studio is restarting" (Screenshots).
This behavior is also showing with a newly generated empty Forms project (Blank Xaml project, portable). Same results with Visual Studio on my notebook, and same results on different devices (Nokia 630 and Samsung AtivS).

  • Visual Studio Community 2015, Version 14.0.25431.01 Update 3

  • Xamarin Forms 2.3.3.180

Thanks for every answer!!


Master Detail Page - Status Bar Problem on Android

$
0
0

I have a problem with the master detail page on Android. The drawer hides even the status bar. You can see only the icons...
I would like to have a semi transparent status bar. I have exactly the same code as in the docs.

How it looks like

What I would like to achieve

Getting error Activity has been destroyed

Detect iOS or Java at runtime

$
0
0

Hello,
I have a Tool (not GUI) compiled Cross Platform (Forms) to run under both Java and iOS.
Is there a way to detect whether the code is running under Java or iOS?

Menu implementation in Windows Phone

$
0
0

I want to implement the menu like android in windows phone
Currently I am using 'MasterDetailPage' for navigation but its show different design on windows phone
Is there any way to implement the same Menu like android in Windows Phone?
Please look into the attached image for more displaying of menu in android and windows phone

Implement 'Done' button in Nemeric Keyboard for Windows Phone

$
0
0

Hi

I am new in Xamarin and creating the App which run on Android / IOS / WP
How we achieve the rendering for Entry control in WP
I am using the numeric keyboard its work fine with Android but I want to implement 'Done' button in Numeric keyboard for Windows Phone.

Thanks

PRISM: Sending messages between App.xaml.cs and the current view

$
0
0

I need to send a message from App's OnResume and OnSleep methods to the current view using PRISM. Does anyone know if this is possible with EventAggregator? I've seen examples on how to use the aggregator between viewmodels, but I'm not sure if it can be used between App.xaml.cs and the current view.

Is it possible to add a banner advertising to my xamarin.forms app?

$
0
0

I could not find a solution for banner implementation. The api from admob does not work for windows phone or uwp. Also i can not add a banner via admob or anything with the pcl project. The banner will be shown always at the bottom of the app. I would like to develop the ui in xaml in the pcl project. I found a discussion with a custom renderer. But it was not a banner advertising. Is it possible to add a advertising in a xamarin.forms app for all plattforms or at least for android and apple?


How to check Location App Permissions in Xamarin Android Marshmallow?

$
0
0

We can create Dependency service to check weather Location service is enabled or not in the device.
But in Application Manager User can disable App Permission(Location).
Identified that we can check app permissions from Marshmallow.

Could you please tell me what is the way, i have tried below solutions but it is not working as expected.

Method1:
PackageManager pm = Forms.Context.PackageManager;
Permission permission = pm.CheckPermission(Manifest.Permission.AccessFineLocation, Forms.Context.PackageName);

Method2:
Permission permission = ContextCompat.CheckSelfPermission(Forms.Context, Manifest.Permission.AccessFineLocation);

Method3:
bool perm2 = pm.IsPermissionRevokedByPolicy(Manifest.Permission.AccessFineLocation, Forms.Context.PackageName);

But No luck. Please let me know solution.

Errors/Warnings when making a Blank App (Xamarin.Forms Portable). In VS

$
0
0

Hello there,

I have a problem trying to get started with Blank App (Xamarin.Forms Portable).
My first step is to actually create the project. Here I get alot of errors which I could fix by updating NuGet packages and rebuilding the solution.
The only NuGet package I couldn't update was Xamarin.Forms for the android solution.

All the solutions have Xamarin.Forms 2.1.0.6529 except for the Droid solution which has 1.5.1.6471.
When I try to install this nuget package I get the following error in output which is also registered on the error list:

Attempting to gather dependency information for package 'Xamarin.Forms.2.1.0.6529' with respect to project 'App11.Droid', targeting 'MonoAndroid,Version=v6.0'
Attempting to resolve dependencies for package 'Xamarin.Forms.2.1.0.6529' with DependencyBehavior 'Lowest'
Unable to resolve dependencies. 'Xamarin.Android.Support.Design 23.3.0' is not compatible with 'Xamarin.Forms 2.1.0.6529 constraint: Xamarin.Android.Support.Design (= 23.0.1.3)'.
========== Finished ==========

Next to that error (and 118 Android errors on Resource.Color, Resource.Stylable and Resource.Dimension stating for example 'Resource.Dimension' does not contain a definition for 'design_tab_min_width' created by exactly this I think), I have the following 5 warnings

General warning on project level

_Warning _
CS0618
' Label.XAlign' is obsolete: 'XAlign is obsolete. Please use HorizontalTextAlignment instead.'
App11
C:\Users\Me\Documents\Visual Studio 2015\Projects\App11\App11\App11\App.cs
22
Active

Android Warnings
After rebuilding again this 1 warning did not show anymore
Warning
The "XamlCTask" task failed unexpectedly.
System.IO.FileNotFoundException: Could not find file 'C:\Users\Me\Documents\Visual Studio 2015\Projects\App11\App11\App11.Droid\obj\Debug\App11.Droid.dll'.
File name: 'C:\Users\Me\Documents\Visual Studio 2015\Projects\App11\App11\App11.Droid\obj\Debug\App11.Droid.dll'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at Xamarin.Forms.Build.Tasks.XamlCTask.Compile()
at Xamarin.Forms.Build.Tasks.XamlCTask.Execute()
at Microsoft.Build.Framework.ITask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
App11.Droid

Warning
IDE0006
Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled.
App11.Droid
1
Active

iOS Warnings:

Warning
The "XamlCTask" task failed unexpectedly.
System.IO.FileNotFoundException: Could not find file 'C:\Users\Me\Documents\Visual Studio 2015\Projects\App11\App11\App11.iOS\obj\iPhone\Debug\App11iOS.exe'.
File name: 'C:\Users\Me\Documents\Visual Studio 2015\Projects\App11\App11\App11.iOS\obj\iPhone\Debug\App11iOS.exe'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at Xamarin.Forms.Build.Tasks.XamlCTask.Compile()
at Xamarin.Forms.Build.Tasks.XamlCTask.Execute()
at Microsoft.Build.Framework.ITask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
App11.iOS

Warning
IDE0006
Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled.
App11.iOS
1
Active

I really just like to get started with some tutorials. Does anybody have an idea on how to fix?

(Im running on Windows 10 , Visual Studio 2015 professional Update 2)

How can I stop Device.StartTimer?

$
0
0

When I use System.Threading.Timer I can stop my timer and start it again:

protected override void OnScrollChanged(int l, int t, int oldl, int oldt)
{
    if (timer == null)
    {
        System.Threading.TimerCallback tcb = OnScrollFinished;
        timer = new System.Threading.Timer(tcb, null, 700, System.Threading.Timeout.Infinite);
    }
    else
    {
        timer.Change(System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
        timer.Change(700, System.Threading.Timeout.Infinite);
    }
}

What is the best way to stop Device.StartTimer and start it again?

"Xam.PCL - Settings Plugin" gives error in test project

$
0
0

I have recently added the Xam.Plugins.Settings to my Xamarin forms project and it is working fine - but it is now failing my unit tests. My unit test are agains ta PCL library but it gives the following error

System.AggregateException: One or more errors occurred. ---> System.NotImplementedException: This functionality is not implemented in the portable version of this assembly.  You should reference the Xam.Plugins.Settings NuGet package from your main application project in order to reference the platform-specific implementation.
   at Refractored.Xam.Settings.CrossSettings.get_Current()

Any ideas? Need to get these tests running really.

How to make the box view disappear when the user click on it ?

$
0
0

How to make a StackLayout Or BoxView Or any control in XAML that will be disappeared when the user click on that particular control ?

Viewing all 91519 articles
Browse latest View live


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