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) ?
StripeView in Xamarin Forms
Default Master Details template gives me errors.
So i've done a clean install to VS2017 Enterprise edition and the problems began already.
When creating a Master Details template I am greeted with the following error during creation:
My UWP project is then broken:
This one I can fix easily by manually installing the "Microsoft.NETCore.UniversalWindowsPlatform".
But my Android project gives the same error. And updating any packages doesn't solve the error.
Seeing I am coming from a clean install, this should work out of the box right?
Why is my custom page full of XML Markup errors but compiles fine?
Basically I'm creating a custom page that inherits from another one (in this case MenuContainerPage from SlideOverKit NuGet, though I doubt it matters).
Custom page:
namespace MagWien.DART.Pages
{
public class MenuContainerEventPage : MenuContainerPage { }
}
Child Page XAML:
<?xml version="1.0" encoding="utf-8" ?>
<pages:MenuContainerEventPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml
xmlns:pages="clr-namespace:MagWien.DART.Pages"
x:Class="MagWien.DART.MapPage">
<AbsoluteLayout/>
</pages:MenuContainerEventPage>
Child Page CS:
using MagWien.DART.Pages;
namespace MagWien.DART
{
public partial class MapPage : MenuContainerEventPage { }
}
Markup errors appear everywhere. The first one is on this line: x:Class="MagWien.DART.MapPage"
It says: The property "Class" does not exist in the "http://schemas.microsoft.com/winfx/2009/xaml" namespace.
Additional ones on every child: The name "AbsoluteLayout" does not exist in the namespace "http://xamarin.com/schemas/2014/forms".
The projects builds and runs fine though. Is there anything I can do to get rid of those errors?
How to play a video in Xamarin Forms? Its possible?
Its possible to play video in xamarin forms?. (Not in separate native code)
I want to play video using portable project.. Its possible in official code or any other 3rd parties available?
Any one suggest me..
Xamarin Form Navigation Bar Color to be changed in Windows platform
I am using a Portable Xamarin form solution to create an Application that will work in IOS, Android and Windows.We are facing a problem in setting the background color of the Navigation Bar. BarBackground color is not working so We tried to change the colors in each Platform but couldn't do it in Windows. Need help to change the color in Windows. Thanks in Advance.
TabbedPage does not update padding of last ContentPage when PopAsync()
Hello,
I'm having this issue on xamarin.forms IOS:
I have three pages a ContentPage with a login, then a ContentPage with a list of items (With a create new item button on the bottom of the page) and finally a third one a TabbedPage which is executed when we select an item.
My problem is when I perform await Navigation.PopAsync(); from the TabbedPage, the padding of the ContentPage with the list of items is not updated, it means that the create new item button disappears.
This peace of code works really well on Android but no on IOS.
If anybody know what is my problem I'll appreciate it
Thanks!
Hiding Label in StackLayout hides ListView as well
Hi,
I'm struggeling to hide my Label in my XAML file:
<StackLayout Margin="20" VerticalOptions="FillAndExpand">
<Label x:Name="labelNoChargers" Text="Text..." />
<ListView x:Name="listView">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding Name}" Detail="{Binding Id, StringFormat = '{0}'}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
in my CS file:
private void OnDeviceDiscovered(object sender, DeviceDiscoveredEventArgs e)
{
var device = e.Device;
if (labelNoChargers.IsVisible)
{
labelNoChargers.IsVisible = false;
}
if (!_discoveredDevices.Any(x => x.Id == device.Id))
{
Debug.WriteLine(this.GetType().Name + ".OnDeviceDiscovered() " + device.Name);
_discoveredDevices.Add(device);
}
}
If I do so, labelNoChargers is hidden, but my ObservableCollection _discoveredDevices disappears as well but comes back eventually when touching items with my mouse on the Visual Studio Android emulator or on device.
Has somebody any ideas how to remove that Label if there are some entries in my ObservableCollection without destroying everything?
Cheers.
How to implement speech(voice)-to-text using xamarin.Forms
Hello Guys. please help, how do i implement a speech(voice) and textbox gets the text in my application.
Changing Picker Title background Color
Hi,
How to change/customize the "Title" color of the Picker Color in Xamarin. Forms.
Note:
We have already changed the Picker Text Color by custom Renderer approach .
we have set the the title color as black but the Title color is showing as very light gray color .
Kindly provide your valuable inputs achieve the same.
XamlCSS - Styling Xaml-Applications with CSS
Hi there!
I recently released a new library: XamlCSS.
It enables you to style your Xaml-applications with CSS.
For Xamarin.Forms: https://www.nuget.org/packages/XamlCSS.XamarinForms/0.9.0-alpha
For WPF: https://www.nuget.org/packages/XamlCSS.WPF/0.9.0-alpha
For UWP: https://www.nuget.org/packages/XamlCSS.UWP/0.9.0-alpha
Example:
Grid Grid Label:nth-of-type(2)
{
Grid.Row: 1;
Grid.Column: 0;
Text: {StaticResource resourceKey};
}
It comes in 3 flavors:
- for Xamarin.Forms
- for UWP
- for WPF
Unfortunately the only documentation at the moment is the sourcecode of the sample-apps in the github-project (https://github.com/warappa/XamlCSS).
I would appreciate if you would provide me with feedback.
MasterDetailPage - Exception touching page button (No drawer view found with gravity LEFT)
I have a XF application with a Login page and a Main page. The Main Page is a MasterDetailPage. When I navigate from Login to Main page I'm able to touch the page button and open my master view. But when I log out and log in again, an exception is raised touching the page button.
My only detail view is a view custom renderer.
Code for Login
InsertPageBefore(new MainPage(), NavigationStack.First());
await PopAsync(true);
Code for Logout
InsertPageBefore(new LoginView(), NavigationStack.First());
await PopAsync(true);
********The exception I'm getting:
02-10 10:40:45.601 W/System.err( 5669): java.lang.IllegalArgumentException: No drawer view found with gravity LEFT
02-10 10:40:45.610 W/System.err( 5669): at android.support.v4.widget.DrawerLayout.openDrawer(DrawerLayout.java:1618)
02-10 10:40:45.610 W/System.err( 5669): at android.support.v7.app.ActionBarDrawerToggle.toggle(ActionBarDrawerToggle.java:290)
02-10 10:40:45.610 W/System.err( 5669): at android.support.v7.app.ActionBarDrawerToggle.access$100(ActionBarDrawerToggle.java:64)
02-10 10:40:45.610 W/System.err( 5669): at android.support.v7.app.ActionBarDrawerToggle$1.onClick(ActionBarDrawerToggle.java:200)
02-10 10:40:45.610 W/System.err( 5669): at android.view.View.performClick(View.java:4832)
02-10 10:40:45.610 W/System.err( 5669): at android.view.View$PerformClick.run(View.java:19839)
02-10 10:40:45.610 W/System.err( 5669): at android.os.Handler.handleCallback(Handler.java:739)
02-10 10:40:45.610 W/System.err( 5669): at android.os.Handler.dispatchMessage(Handler.java:95)
02-10 10:40:45.610 W/System.err( 5669): at android.os.Looper.loop(Looper.java:211)
02-10 10:40:45.610 W/System.err( 5669): at android.app.ActivityThread.main(ActivityThread.java:5321)
02-10 10:40:45.610 W/System.err( 5669): at java.lang.reflect.Method.invoke(Native Method)
02-10 10:40:45.610 W/System.err( 5669): at java.lang.reflect.Method.invoke(Method.java:372)
02-10 10:40:45.610 W/System.err( 5669): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1016)
02-10 10:40:45.610 W/System.err( 5669): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
Unhandled Exception:
Java.Lang.IllegalArgumentException: No drawer view found with gravity LEFT
Please, let me know if you need more info.
Thanks
Xamarin.Forms 2.3.4.192-pre2
We've pushed Xamarin.Forms 2.3.4.192-pre2 to nuget. To install the pre-release, check the pre-release option in your nuget manager and install this version.
If you’ve got a bug to report, drop us a quick report here so we can troubleshoot in detail.
2.3.4.192-pre2
For all the details, please read the release post here.
2.3.4.184-pre1
This release builds upon 2.3.4.184-pre1. Revisit that thread discussion here.
Xamarin Forms iOS Button Click Event is not Firing when the keyboard is open
Hi All,
I have a login view with a UserName & Password field and a Login Button.
While entering UserName & Password the keyboard opens and when i click login now, the click event is not getting called. Only the keyboard is getting hidden. Now when i click login it works.
Seems like, if the keyboard is open and a button is pressed, it takes it as a screen touch event and closes the keyboard, but doesn't call the click event.
This is happening after i upgraded to the latest version of Xamarin.
Please advise.
Thanks,
Manoj
Xamarin.Forms bug? System.ObjectDisposedException: Cannot access a disposed object
Hi,
My Android Xamarin.Forms application uses a Navigation stack to display various views, I often have a list on a screen (A) that once a cell is clicked I push onto the stack a new screen (B), the user completes some form fields and then clicks a button to save. Once they click the 'save' button a task is created on the thread pool to asynchronously perform some work (no async/await and no dependency on any UI) and the view is popped back to screen (A).
Once the task is completed, it fires a simple event using the PubSub library, on the UI thread, so screen (A) has the opportunity to refresh from the local database and it does.
The problem is that when I go to drag the updated list on screen (A), the app crashes with an ObjectDisposedException intermittently (like 1 in 50 times)...
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Android.Views.GestureDetector'.
at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00030] in /Users/builder/data/lanes/3819/c1d1c79c/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.cs:153
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00002] in /Users/builder/data/lanes/3819/c1d1c79c/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:57
at Android.Views.GestureDetector.OnTouchEvent (Android.Views.MotionEvent ev) [0x0002c] in /Users/builder/data/lanes/3819/c1d1c79c/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.GestureDetector.cs:1546
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Android.Views.View.IOnTouchListener.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x0003f] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:101
at Android.Views.View+IOnTouchListenerInvoker.n_OnTouch_Landroid_view_View_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v, System.IntPtr native_e) [0x00019] in /Users/builder/data/lanes/3819/c1d1c79c/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.View.cs:3558
at at (wrapper dynamic-method) System.Object:4eaabbb9-8c1c-4ea1-b505-44c325bbb1ab (intptr,intptr,intptr,intptr)
I'm not sure why it says that I cannot access a disposed object, I'm interacting with a list with a gesture detector, it's on-screen, so it's not disposed.
Is this a bug in Xamarin.Forms?
On a similar note, if I modify an MVVP property that notifies listeners that a property has changed (I always check it's on the UI thread first), then if that's bound to a Xamarin.Forms list but it's not currently on-screen, presumably Xamarin.Forms will not barf ? After-All it's just off-screen and should still bind okay?
Xamarin Forms Map error on Andriod after updating Xamarin Forms and Maps to 2.3.3.193
After upgrading Xamarin Forms and Maps to version 2.3.3.193, I now receive the following error on my Andriod app when I attempt to display a map:
{Xamarin.Forms.Platform.Android.ViewRenderer<Xamarin.Forms.Maps.Map,Android.Gms.Maps.MapView>}
{System.MissingMemberException}
Android.Gms.Maps.MapView.get_Map' not found
Any idea what is going on? It worked before the update. Any assistance would be appreciated.
Out of memory on Bitmap Factory (Xamarin.Forms)
Hi.
I'm seeing repeated out of memory crashes that look like this:
Android: 6.0.1
Android Build: MMB29M.G900VVRS2DPL1
Manufacturer: samsung
Model: SM-G900V
Thread: main-1
CrashReporter Key: 0CBEBADF-8B31-05D7-CE57-27A9F3183E2F32F3D8A7
Format: Xamarin
Xamarin caused by: java.lang.OutOfMemoryError: Failed to allocate a 7200012 byte allocation with 4806584 free bytes and 4MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:856)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:675)
at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:703)
at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:733)
Any ideas on what this is trying to tell me and how to rectify the situation? Thanks!!
Button control does not display in running ? need help
Button control does not display in running ? need help
Hello all , i have problem i need help please
when i design my application , i set Button and textview
but when i run my Application in my emulator
its now displing ?
why ?
can you help us ?
thank you
No property, bindable property, or event found for 'YConstraint' after update to Forms 2.3.3.168
Hello, I have a annoying problem after the update from Xamarin.Forms 2.3.2 to 2.3.3. I'm not able to build my project anymore. The build stops on usage of the MarkupExtension -> RelativeToViewVertical on XAML Pages with a XML Error: "No property, bindable property, or event found for 'YConstraint'"
Xaml Usage:
..
xmlns:support="clr-namespace:MyApp.Layout;assembly=MyApp"
..
<RelativeLayout>
<Label
FontSize="13"
Text="{Binding DetailText}"
RelativeLayout.YConstraint="{ConstraintExpression Type=Constant, Constant=50}"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Constant=-142}"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=Constant, Constant=60}"
/>
<Button
Text="test"
BackgroundColor="Transparent"
BorderColor="Transparent"
FontSize="14"
Command="{Binding ForgotPassword}"
RelativeLayout.YConstraint="{support:RelativeToViewVertical ElementName=ElementBefore, Constant=105}" <!-- crashes here -->
RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Constant=-170}"
/>
With that kind Extension: https://github.com/Mike-EEE/xamarin-forms-samples/blob/master/FormsGallery/FormsGallery/FormsGallery/Support/RelativeToViewHorizontal.cs
The error appears since Forms 2.3.3-pre1 (2.3.2.127 works fine). When I setup a new Project with Forms 2.3.3 and the RelativeToViewVertical code it works. Any ideas?
Use MasterDetail page (Menu) and Navigation page in a project
Hello All,
I am developing XF app for iOS and Andorid. I need to use Menu in my project. I followed this article to use MasterDetail navigation page - https://www.syntaxismyui.com/xamarin-forms-masterdetail-page-navigation-recipe/. And it is working fine.
But now I need to use navigation page before using MasterDetails page. Let me explain with an example -
*** LoginPage.cs is a simple content page that will be shown when app starts. After successful login app will show Menu (using MasterDetail navigation page).
In my App.cs file I have used
MainPage = new LoginPage ();In LoginPage after successfully login, I am using the code to load Menu (MasterDetails page)
Application.Current.MainPage = new RootPage () // RootPage is a subclass of MasterDetail page
But problem is - after showing Menu, app is crashing without not showing any message in application log. I investigated and debug and found that app is crashing due to "Application.Current.MainPage = new RootPage ()". Though this code should be work.
So, my question is what is the best practice to use MasterDetail page after using normal navigation page ( MainPage = new LoginPage (); ).
Any suggestion will be highly appreciable!
Thank you,
Arefin
Recommendations for dynamic slots for image upload in xamarin forms + MVVM
Hi guys!
I need to create a product form with dynamic slots to upload images. When user touches a slot he can select an image it is presented on that slot.
Those slots are dynamic because some customers have limited slots. For example, the customer1 can upload 3 images, the customer2 can upload 5 images, and so on...
So, what strategy do you recommend to present these slots dynamically as a grid right bellow a form?
I'm using Xamarin Forms, MVVM with Prism and XAML.
Thanks in advance!