FAQ Database Discussion Community


custom animation for navigation between pages Xamarin.forms?

navigation,xamarin,xamarin.forms
I create simple App using Xamarin.Forms and need to set the navigation to up & down instate of left & right

How to group the list based on category in listview xamarin forms

c#,xaml,xamarin.forms
I have to group the list in listview based on category like Bird,Fish,Animal..etc in Xamarin.Forms PCL Project. Please give any reference tutorial or demo code.

Xamarin.Forms: GroupHeaderTemplate is not visible, neither are the items but seems to partially render

c#,android,listview,xamarin,xamarin.forms
I have a GroupHeaderTemplate in Xamarin.Forms for a ListView element which is not rendering. You can select the headers, and pull up the quick menu. I can successfully render the groups if I use the property of the ListView element GroupDisplayBinding, yet when I specify GroupHeaderTemplate property of ListView nothing...

Xamarin.Forms 1.4.3-pre2 compilation error

xamarin,xamarin.forms
I upgraded Xamarin.Forms to the 1.4.3-pre2 version. I didn't change anything in the code and I'm getting this compilation error: Target XamlC: : error : Error initializing task XamlCTask: Not registered task XamlCTask. Any idea?...

How to Add Click event in Stack Layout or Frame

android,ios,xaml,xamarin,xamarin.forms
I am new in xamarin.forms please help me out how i can add click event in Stack Layout or Frame <Frame Grid.Column="0" BackgroundColor="#ffffff" Grid.Row="0" HasShadow="true" OutlineColor = "Black"> </Frame> <StackLayout Grid.Column="0" BackgroundColor="#313FA0" Grid.Row="0"> </StackLayout> ...

Xamarin.Forms ListView ViewCell issue on iOS

ios,xaml,xamarin,xamarin.forms
I've been trying to get this looking right in Xaml (x.forms) but can't make it work. Any possibly way this can be solved in Xaml without a custom cell renderer? Here is how it's supposed to look on native iOS: What I'm getting so far in Xaml: Here's my Xaml:...

How to Change the MenuItem Colors of Forms ViewList in iOS ViewCellRenderer?

ios,xaml,monotouch,xamarin,xamarin.forms
Is there any way to Change the color of ContextAction Menus added in Xamarin.Forms Xaml file. IsDestructive="True" sets the menu color to Red. But i need another menu to look like Green or some other color. Here is my Forms Xaml code.. <ListView x:Name="planList" ItemsSource="{x:Static local:SampleData.PLAN_DATA}" RowHeight="150" HorizontalOptions="FillAndExpand"> <ListView.ItemTemplate> <DataTemplate>...

Convert C# DateTime into GregorianCalendar date

java,c#,xamarin.forms
How to convert the dotnet C# DateTime with millisecond into equivalent value of Java.util.date time object with the millisecond value I have following code sample. DateTime cdate = new DateTime(2014, 01, 01); cdate.AddMilliseconds(100); I need this c# date into java.util.date object with the same millisecond. Java.Util.GregorianCalendar date = new GregorianCalendar()...

Xamarin Forms OnPlatform in Xaml

xaml,xamarin.forms
I have the following C# code: var footer = new StackLayout() { BackgroundColor = Device.OnPlatform(Color.FromRgb(225, 240, 251), Color.FromRgb(225, 240, 251), Color.Black), }; How can I translate that into Xamarin Xaml, more importantly the Device Platform specifics for the FromRgb? I have the following XAML so far... again, it's the FromRgb...

Xamarin.Forms : How to use localization independent of device language

c#,ios,localization,xamarin,xamarin.forms
I am developing a Xamarin.Forms app (portable class library project) with Visual Studio 2013 CE. First I'm focusing the iOS version. Now I'm thinking about how to make the app multilingual. I just read the offical Xamarin documentation about it but i realized that this solution only takes the system...

How to fix missing method exception in Xamarin.Forms PCL Android mobile app

xamarin,monodroid,xamarin.forms
I'm getting a System.MissingMethodException error after updating Xamarin.Forms package for Android Mobile App. In MainActivity.cs line #22: LoadApplication (new App ()); Application Output: [] Missing method Android.Runtime.JNIEnv::StartCreateInstance(Type,string,JValue*) in assembly Mono.Android.dll, referenced in assembly /storage/emulated/0/Android/data/XAMLDataBindings_PCL.Droid/files/.__override__/Xamarin.Android.Support.v4.dll I have tried Clean & Rebuild All as mentioned on the Xamarin forum but still not...

Is there any way to use a pre-existing database from Xamarin without copying it from Assets?

android,xamarin,xamarin.forms
I have a rather large SQLite database (~20 mb) I need to access from my Android Xamarin-Forms app. Everything online I've read says you can read the database by copying it to the filesystem first. For example, this question. However, won't that mean the large database is duplicated, wasting users'...

Visual Studio 2013 crashes when writing opening angle bracket

visual-studio,xaml,crash,intellisense,xamarin.forms
everytime I try to write an opening angle bracket in vs13 it crashes. The Problem only happens in a xamarin.forms project and in an xaml-file. Every other key works fine, just the opening angle bracket causes the problem. If I copy/paste it in the code it works fine, as well......

Losing data/files after app closes Xamarin Forms

c#,xamarin,monodroid,xamarin.forms
I am developing a crossplatform app with Xamarin and got stuck with this problem. Every time I launch my app, all the data I had saved before is lost. To give more details, I am using SQLite to persist some information and even storing some image files in the app's...

Unable to reference Xamarin.Forms in brand new project

c#,xamarin,xamarin.forms
I am trying to write a Xamarin Forms example for the PCL based socket implementation. The project will not build due to not being able to resolve 'Forms'. The Project is brand new (5/27/2015) and I have yet to add any custom code or packages to it. I am using...

Xamarin.Forms.Xaml.XamlParseException: MarkupExtension not found for trans:Translate using a PCL in Release Mode

c#,android,xamarin,xamarin.forms
I'm pretty desperate finding the solution for the problem stated below. I have a cross platform solution which has 4 projects, 3 OS specifics     MyApp.android,     MyApp.Winphone,     MyApp.IOS and a PCL project     MyApp.BLL inside the MyApp.BLLbll, I'm using the MyApp namespace and in the root I have...

UIView hides Navigation bar back button text how to make it visible?

swift,ios7,xamarin.forms
I am trying to change Navigation bar background to Gradient Red. I have added subview to navigation bar which sets background to Color I want. but then Navigation bar back button Text is invisible. Back button is visible but Text is not Visible. UIView view = new UIView(); var gradient...

xamarin forms permission to use location iOS

ios,xamarin,geolocation,cllocationmanager,xamarin.forms
I'm using Xamarin.Forms and creating an iOS App who has a background service to get a location each 10 minutes. The code is working, my problem is when I access the App configuration on an IPad. It shows the permission for accesss the camera but not to access the current...

How do you use RelativeLayout with controls that depend on their own size for their position?

xamarin.forms
I'm having quite a few other problems with layout that require a lot of extra InvalidateLayout() calls, so I'm starting to question if I understand how RelativeLayout works. Here's a very simple example of a UI that wants a right-aligned label: public class MainPage : ContentPage { public MainPage() {...

Xamarin Forms, how to crop\resize Image, get byte[] from ImageSource?

c#,image,image-processing,xamarin,xamarin.forms
I can't find a way to implement a profile pic saving, can somebody help me with example? I'm capturing an image using MediaPicker (from Xamarin Labs), and then don't know how to crop it or resize to smaller mb size, tried Xamarin Resizer, but can't crop image if it is...

Xamarin.Forms Maps crashing app

google-maps,xamarin,xamarin.forms
I'm having a hard time trying to show a map on my Xamarin Forms app. This is the error I get everytime I open the page with the map: 0x29 in System.Diagnostics.Debugger.Mono_UnhandledException_internal C# 0x1 in System.Diagnostics.Debugger.Mono_UnhandledException C# 0x6 in Android.Runtime.UncaughtExceptionHandler.UncaughtException at /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/monodroid/src/Mono.Android/src/Runtime/UncaughtExceptionHandler.cs:35,4 C# 0x1C in...

Xamarin.Forms: Can I embed one ContentPage or ContentView into another ContentPage

xamarin.forms
I have multiple ContentPage xaml files in my Xamarin project. I want to embed a shared piece of xaml into each ContentPage. There is nothing particularly special about the shared piece of xaml (it does't need to do anything platform specific). Shouldn't it be just as easy as embedding a...

Excluding unit tests only on specific platform

c#,unit-testing,cross-platform,xamarin.forms,xunit.net
My scenario is as follows: I'm working on a cross-platform mobile app with Xamarin.Forms. Part of this solution are unit test projects that target iOS/Android/WP8, and the tests that are executed on each platform are in a shared library. The tests are written with the xUnit.Net framework. Now I have...

The type or namespace name 'IPAddress' could not be found

c#,.net,xamarin,cross-platform,xamarin.forms
I'm writing a Xamarin.Forms application and have added a PCL project into my main solution in Visual Studio 2013. I'm having problems with using several standard .net classes. Here's a list: System.Net.IPAddress System.Net.IPEndPoint System.Net.WebClient System.Net.Sockets.UdpClient System.Timers.Timer System.Timers.ElapsedEventArgs System.Net.NetworkInformation.UnicastIPAddressInformation My question is: How do I figure out which of the above...

Xamarin.forms - How to display tabs on the middle of a layout

xamarin,xamarin.forms
I would like to add tabs just below custom header(Grid), but I am not sure how to do that. So far I have grid and tabbedPage, but how to display both in one page? Thank you for help.

Xamarin.Forms iOS Simulator Build for Facebook Review

ios,facebook,xamarin,xamarin.forms
How can i generate a Simulator Build with Xamarin? I'm using Xamarin.Forms and Facebook SDK component. This is needed in order to upload the app for Facebook review: https://developers.facebook.com/docs/ios/creating-ios-simulator-build-for-review#generate-simulator...

WebRequest not working with ssl on Xamarin.Forms, despite servicePointManager hack

mono,monotouch,xamarin,monodroid,xamarin.forms
I am writing an application that needs to read from a REST api that is only available over https. I am running into the issue where the request fails in Mono.Security, with the message: "The authentication or decryption has failed." I did my research and found that Mono by default...

TableView Header Section Covers The Rows

xamarin,tableview,xamarin.forms
I have two questions: 1- I'm trying to do a simple table view with Xamarin forms, but i have found that the header sections cover the below cells (rows in table). I just wants that the header section disappears like the cells when move the page and just maintain de...

Xamarin Forms Swipe Left/Swipe Right Gestures

c#,xaml,xamarin,xamarin.forms
I want to preface this by saying i'm completely new to mobile development, Xamarin, C#, .Net. I'm working on creating a mobile app using Xamarain Forms and have run into the problem of not having the swipe gesture available to me, at least according to the documentation I've seen. I...

MvvmLight's SimpleIoc breaking in Xamarin Forms 1.3 Android and iOS app, but not in Windows Phone

xamarin,inversion-of-control,mvvm-light,xamarin.forms,common-service-locator
I am working on a Xamarin Forms app and all is going well with the Windows Phone building and running. However when I try and run the Android version, it build OK and then fails and I get an exception when calling the ServiceLocator to resolve ViewModel in the ViewModelLocator....

How to hide out a layout in Xamarin.forms C#?

c#,android,monodroid,xamarin.forms
I have a Stacklayout with switch control, when the switch values are true i have to show the layout and if the value changes to false i have to hide the layout. Based on some samples, i saw how to hide out a button but for hiding out a layout...

Xamarin.Forms JSON object into Listview

c#,json,xamarin,xamarin.forms
I'm trying parse this JSON object and bind it to my ListView in Xamarin.Forms. I'm just totally lost on how to handle it as i'm completely new to Xamarin Forms. Is there a easier way to do this? My returned JSON Object [ { "id": 1, "name": "Leanne Graham", "username":...

XamarinForms XAML: How can I inherit properties from another XAML file like ResourceDictionaries?

c#,xaml,inheritance,xamarin,xamarin.forms
I'm using Resource Dictionaries a lot, but it's getting tedious having to copy and paste them from one Xaml to the other to have them all update. The only way I've seen this done is inheriting a style class, but I do not like the way properties are declared in...

Xamarin Forms: ContentPage OnCreate event?

c#,xamarin,monotouch,xamarin.forms
I'm creating a messaging app, and I need that when I enter the messaging thread with someone, message bubbles show inside the layout. I'm doing this easily using: MyMessageThreadStackLayout.Children.Add( // Message bubble building logic goes here ); But currently, I'm putting this inside the: protected override void OnAppearing () But...

The “LinkAssemblies” task failed unexpectedly

xamarin,xamarin.forms,xamarin-studio
When we are trying to build a xamarin forms project in release mode, we are getting the error: C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(5,5): Error MSB4018: The "LinkAssemblies" task failed unexpectedly. Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'System.Void Android.Widget.AbsListView::SetSelectionFromTop(System.Int32,System.Int32)' (defined in 'Xamarin.Forms.Platform.Android, Version=1.3.3.0, Culture=neutral, PublicKeyToken=null') from...

Xamarin.forms shared project giving error while creation

c#,c#-4.0,xamarin,xamarin.forms
When I create a new xamarin.forms project it is giving error. "Could not add all required packages to the project. The following packages failed to install from 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\XAMARIN\XAMARIN\3.9.236.0\Packages'": Xamarin.Forms.1.3.1.6296: Could not install package 'Xamarin.Forms 1.3.1.6296'. You are trying to install this package into a project...

Bundle Warning creating android project xamarin

android,xamarin.forms,xamarin-studio
Im having this issue where I create an empty project and then I create and android project within that, Now if I go to the Main.cs or create my own activity, the Bundle is underlined and on hover I get the following error, As seen below. Zoomed : I haven't...

Xamarin.Forms: Use of GetMainPage()

c#,ios,monotouch,xamarin,xamarin.forms
I'm currently reading the navigation section from An Introduction to Xamarin.Forms. One should use the GetMainPage() method. But how should that be used? The default implementation of the app delegate looks like the following: Applicaton Delegate: public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate { public override bool FinishedLaunching (UIApplication app, NSDictionary...

Xamarin, using Geolocation from Xlabs sample

c#,android,xamarin,xamarin.forms,xlabs
Using Xamarin Shared Project. I tryed to include in my share project the Geolocation feature from Xlabs sample but i'm having problems when it comes to call the dependencyService. I have a content page and in there i have my button that has a command like this: Command = new...

reusability user controls of Xaml in xamarin.forms

xamarin.forms
I am trying a new approach i.e. XAML to make application in xamarin.forms. At this time i am facing an issue to reuse my stack layout which is having a image and label. How i can reuse my layout in different pages using XAML.

Xamarin IMobileServiceTable Not Filtering

c#,azure-mobile-services,xamarin.forms,xamarin-studio
I'm using IMobileServiceTable in an data access layer class and bind it to an listview. Initial loading works fine but filtering doesn't. It always returns the initial loaded data. public class ItemsManager { IMobileServiceTable<Item> itemTable; public ItemsManager (IMobileServiceTable<Item> todoTable) { this.itemTable = todoTable; } public async Task<List<Item>> GetTasksAsync (string searchString)...

Searching in grouped ListView in Xamarin.Forms

c#,listview,xamarin,observablecollection,xamarin.forms
Background I followed this guide to create a grouped ListView in Xamarin.Forms. Doing so, the following Property is given which is bound as the ItemSource of the ListView: DevicesGrouped = new ObservableCollection<Grouping<string, Device>>(sorted); Everything works just fine, including the grouping functionality. To search (and thereby filter) the entries in the...

Xamarin Forms Switch XAML

xaml,xamarin,xamarin.forms
I'm new in Xamarin and i'm trying to create a simple page with some components. One of these component is a Switch it works fine by itself but i would like to change the basic text "inactive/active" by "male/female" I've seen that in Xaml for windows phone there is a...

How to add a separator space between rows on custom Xamarin.Forms ViewCell?

c#,listview,grid,xamarin.forms,custom-cell
In this question on Xamarin Forums https://forums.xamarin.com/discussion/20517/curved-corners-in-tableview-cells Craig Dunn teaches how to create a cell with frame. I want to Add a space between each cell. At present the cells seems glued, and the ViewCell doesn`t have a space property. Thanks!...

Xamarin camera access in a shared project

c#,xamarin,xamarin.forms,xamarin.mobile
I'm building a shared project and I want to access the camera. For now i'm just trying to get this to work on android. I found this here in stackoverflow and it works but I'm not being able to put this to work in my project becouse I want to...

Floating Action Button in Xamarin.Forms

android,xamarin,monodroid,xamarin.forms,floating-action-button
I had completed my App's home page in Xamarin.Forms Portable. Now i want to add a Flotation Action Button In my Android Project ! Is there any way to add FAB for Android in my existing home page, which was coded in Xamarin.Forms Portable. OR I want to create a...

Xamarin.Forms: Set BackgroundImage from embedded image

c#,xamarin,xamarin.forms
In Xamarin.Froms, is it possible to set an embedded image as my BackgroundImage? Thanks....

Binding BarBackgroundColorProperty in Xamarin.Forms

c#,xamarin,xamarin.forms
I'm relatively new to C# and the idea of data binding (that is, I'm not sure I completely understand it). I am looking to try to bind NavigationPage's BarBackgroundColorProperty for sake of being able to change my root page's bar background color multiple times for a theme feature I'm trying...

Xamarin : Loading resources via GetManifestResourceStream

opengl-es,xamarin,monotouch,xamarin.forms
I am working on a Xamarin forms project to use OpenGL/OpenTK. I am trying to load a shader using GetManifestResourceStream. Whatever I do I get null code is being run from .Shared project, shaders are in .ios / .Android resources directory string prefix; #if __IOS__ prefix = "OpenGLTesting.iOS."; #endif #if...

Where should I place authentication-logic in my MVVM mobile application?

mvvm,xamarin,xamarin.forms
So I'm currently developing an application with Xamarin.Forms. Xamarin Forms uses the MVVM pattern, and I feel somewhat comfortable using this pattern, but I do have some issues. To keep this simple, I'll use an example of a single-page application. This is how I've structured it so far: MainView.xaml //View...

Xamarin Forms StackLayout: How to set width / height of children to percentages

xaml,xamarin,xamarin.forms
Is there a way to create a vertical stack layout with a button that takes 30% of of the parent, and a text input that takes 70% of the parent? Something like this: <StackLayout Orientation="Vertical"> <Entry Height="70%"></Entry> <Button Height="30%">Click me</Button> </StackLayout> But this doesn't work. Only solution so far is...

Xamarin forms background image for all Pages

xamarin,xamarin.forms
It´s possible to set an image to be the background of all Pages on my application (for all platforms IOS, Android and WP) ? Page has a BackgroundImage property, so I can create a base page, set the background and make all my pages extends from it. I want to...

Create a BindableProperty depending on multiple properties

c#,mvvm,data-binding,properties,xamarin.forms
I'm trying to bind a UI element to different model properties A, B and AB. The first two properties A and B are controlled by two sliders. The third property AB is the sum of A and B. For each of the three properties there is a label displaying its...

Using Xamarin Forms, How can I change page without displaying a navigation bar?

mobile,xamarin,xamarin.forms
I want to change pages in Xamarin Forms, to do this I have read that you need to use a NavigationPage as the root page. My problem is I can't get rid of the navigation bar at the top. I have tried using SetHasNavigationBar but it doesnt seem to work...

VS 2015 “Add Connected Service” -> “Mobile Services” - Configure button disabled

azure-mobile-services,xamarin.forms,visual-studio-2015
I just created a new Xamarin Forms project in Visual Studio 2015 RC. I want to use my Azure Mobile Service I created via the portal, so I right clicked on the References for the Portable app project in the solution and selected the "Add Connected Service..." menu item. It...

BindableProperty not updated on ViewModel

xaml,data-binding,xamarin.forms
In Xamarin.Forms I implemented a custom Picker. The ItemsSource is set correctly. However when i change the selected item it does not update the property on my ViewModel. The BindablePicker: public class BindablePicker : Picker { public BindablePicker() { this.SelectedIndexChanged += OnSelectedIndexChanged; } public static BindableProperty ItemsSourceProperty = BindableProperty.Create<BindablePicker, IEnumerable>(o...

ADAL 3.2 alpha AcquireTokenAsync iOS does not dismiss sign in form

xamarin.forms,adal
I've been using the ADAL 3.x alpha versions with Xamarin.Forms on iOS for a couple of months now and had no problems with 3.0 and 3.1, however with 3.2 I get the problem that the sign in screen does not dismiss when you click the "Sign in" or "Cancel" buttons...

XamarinForms: StackLayout inside RelativeLayout is not filling the whole screen

c#,xaml,xamarin,xamarin.forms
I have this <RelativeLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="Red"> <StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" Padding="0,15" Spacing="10"></StackLayout> </RelativeLayout> But for some reason, even tough the relative layout clearly expands, the StackLayout doesn't. How can I get the stacklayout to stretch horizontally and fill the whole width/height of the screen?...

Using an Object in Mobile App c#

c#,oop,xamarin.forms
I'm working on a simple mobile app game using c# and Xamarin.Forms and have gotten stuck trying to use an object class called Player. class Player { private int level; public int Level { get { return Level; } set { Level = value; } } public Player() { //variables...

Xamarin.Forms: Start an activity using DependencyService

c#,android-activity,xamarin,monodroid,xamarin.forms
In my Xamarin.Forms.Page I have a DependencyService that must activate an activity in my .Droid project. How do I activate the Activity? I've tried StartActivity(typeof(FacebookActivity)); but I get Java.Lang.NullPointerException: Exception of type 'Java.Lang.NullPointerException' was thrown. What do I have to initialize? ...

How to return a value after making the request with OAuth2Request?

c#,.net,xamarin,xamarin.forms,xamarin.auth
I'm trying to return the value of an object but it returns null, however it returns a value in the request. using System; using Xamarin.Auth; using Newtonsoft.Json.Linq; using System.Collections.Generic; using System.Linq; using Xamarin.Forms; namespace RegistroAgil_Couchbase.Droid { public class UserInfoRepository { public OAuthUserInfo Get() { var mainActivity = Forms.Context as MainActivity;...

Xamarin Form Reactive UI MasterDetailPage

xamarin.forms,reactiveui
Currently I have using reactiveui RoutedViewHost to navigate around my Android app. I wanted to use the new MasterDetailPage, is it supported in reactiveui?...

xamarin.forms.labs ImageButton issue

xaml,xamarin,monodroid,xamarin.forms
I am using Xamarin.Forms and a Monodroid project. I use Xamarin.Forms.Labs to render an ImageButton control. Everytime I try to render the control in xaml I get this exception: System.TypeInitializationException: An exception was thrown by the type initializer for Xamarin.Forms.Labs.Controls.ImageButton ---> System.MissingMethodException: Method 'BindableProperty.Create' was not found. Here is the...

Xamarin.Forms: Custom renderer for displaying disclosure indicator on UITableViewCell

c#,ios,uitableview,monotouch,xamarin.forms
I want to show a disclosure indicator on my table view cell for iOS. I found this thread and a custom renderer has been proposed. I tried this: [assembly: ExportRenderer (typeof (EmployeeCell), typeof (EmployeeCellRenderer))] namespace HelloXamarinFormsWorld.iOS { public class EmployeeCellRenderer : Xamarin.Forms.Platform.iOS.ViewCellRenderer { public override UITableViewCell GetCell (Cell item, UITableView...

Snapshot of a Xamarin.Forms.View

android,bitmap,xamarin,monotouch,xamarin.forms
I am making an application using Xamarin.Forms, and I need to make a snapshot of a view (including parts not currently visible). I know full well how to do this on android, but I haven't found any clues on how to do this with Xamarin.Forms.View Is there a way to...

Accessing the AssetManager in Xamarin Forms

android,xamarin,assets,xamarin.forms
In Xamarin Forms, in a Dependency Service, I need to access an Asset. How do I get the AssetManager from within a Dependency Service?...

Couchdb filter using reduce functions/linked documents

couchdb,xamarin.forms,couchdb-futon
Considering: doc profile { _id:"1", name:"john", likes: ["2222","1111"] } doc likes { _id:"2222", value:"true" } { _id:"1111", value:"false" } I have a filter on my xamarin app to get the profile, and it works well but I need to include the "children" (linked) docs... I can do this with a...

Add ios project to xamarin forms solution with droid project

xamarin,xamarin.forms,xamarin-studio
I've got a xamarin forms solution with a pcl and a .Droid project. Now I also want to add ios to the solution. How do I do this. From the add dialog I can select add new project, but it seems to add a lot more....So the solution was first...

Expanding the size of ListView cell on tap

xamarin,xamarin.forms
I'm trying to implement a solution to increase the size of a ListView Cell when tapped using Xamarin Forms (and custom renderers if required). I'm still pretty new to C#, and the idea of data binding is still a little unclear to me, however, it seems like that is the...

How to customize Xamarin.Forms app?

xamarin,xamarin.forms
How can I customize the appearence of xamarin.forms components? I want each button to have the same image, for instance. Or for all systems to share the same login screen with the same background image. I know I can do that by adding one specific screen to each platform project....

Add text to bound values in Xamarin.forms

binding,xamarin.forms
My modelView: public string Status { get { return _status; } set { if (value == _status) { return; } _status = value; OnPropertyChanged ("Status"); } My View: Label labelStatus = new Label { TextColor = Color.Green, FontSize = 20d }; labelStatus.SetBinding (Label.TextProperty, "Status"); Then I want to present the...

Xamarin.Forms ListView custom cell is not selectable

listview,selection,xamarin.forms
I created a custom cell: public class TextCell2 : ViewCell { public TextCell2() { View = new StackLayout { Orientation = StackOrientation.Horizontal, HorizontalOptions = LayoutOptions.FillAndExpand, Children = { new Label { Text = "Test" }, new Button { Text = "Test 2" } } }; } } If I don't...

RowSpan and ColumnSpan in Xamarin Forms

c#,layout,grid,xamarin.forms
Is there anyone out there who can explain to me how rowspan and columnspan in Xamarin Forms? The parameters right, left, top, bottom are a little bit confusing. Lets use this code snippet for rowspan: grid.Children.Add(new Label { Text = "Span two rows (or more if you want)", TextColor =...

Xamarin UISwipeGestureRecognizer Renderer

c#,monotouch,uigesturerecognizer,xamarin.forms
In Xamarin.Forms I want to be able to swipe left and right to navigate a list of pictures. At the moment I just want to be able to fire an event each time a swipe is detected. child class to be used in the renderer: public class LRMasterDetailPage : ContentView...

Xamarin.Forms Dependency Service ActivityNotFoundException: No Activity found to handle Intent

android,xamarin,monotouch,monodroid,xamarin.forms
I'm using Xamarin.Forms Dependency Service to make a phone call in my PCL. The method itself is : public void Call(string number) { var uri = Android.Net.Uri.Parse(number); var intent = new Intent(Intent.ActionView, uri); Forms.Context.StartActivity(intent); } Method call: DependencyService.Get<IPhoneDialler>().Call("+447836726414"); Using it throws Android.Content.ActivityNotFoundException: No Activity found to handle Intent Same approach...

Pass object in click/tapped event handler in Xamarin Forms

c#,listview,xamarin,xamarin.forms,eventargs
Here is my job class: public class Job{ public string Id{ get; set;} public string Name{ get; set;} } And here is my ListView: public class JobListePage:ContentPage { // Members private ListView lstView; // Constructor public JobListePage () { // Set members lstView = new ListView (); // Create job...

How to prevent Images squeezed in Xamarin.Forms Button?

monotouch,xamarin.forms
Button Images inside Xamarin.Forms are appearing squeezed on iOS. How do you set the Image to display in normal aspect ratio in XAML? Also as a bonus how do you make sure the Button Images line up vertically? I have tried setting the WidthRequest XAML property but it has no...

How to set SQLite.NET page size in Xamarin app? PRAGMA page_size ignored

xamarin,xamarin.forms,sqlite.net
After a lot of searching I haven't been able to find how to change the SQLite.NET Pagesize from the default of 4096. I have a Xamarin Forms PCL app with SQLite.NET Async PCL Nuget (and Twincoders Extensions but that's not relevant). In the platform projects, SQLiteConnectionString does not appear to...

Xamarin forms how to retain spacing and other dimensions for controls, images and Icons across the screen?

xamarin,autolayout,xamarin.forms
do I need to have different images for different screen sizes for iOS for (4s 5s, and above)? how can we set retain dimensions of images/Icons and controls across the screen sizes and resolutions in iOS (using Xamarin forms). please refer this to understand problem Autolayout and proportional positioning but...

Xamarin.Forms Navigate to another page using ViewModel

c#,mvvm,xamarin,xamarin.forms
I have several ContentPages and I want to navigate from one to another at the click of an element in the page. I have my ViewModel class: class JumpVM : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; private INavigation _navigation; public ICommand NewPage { get { return new Command(async () =>...

Xamarin Forms, using async to apply ListView ItemSource

c#,listview,asynchronous,xamarin.forms
I am currently using Xamarin Forms and I am using the post method which I got from github RESTAPI. My application crashes whenever I try to apply the data to my ListView ItemsSource. The following is the success callback that is currently executed, and it retrieves the JSON and serialize...

How to Remove Xamarin.Forms (1.4) ListView Header

listview,xamarin.forms
I am working with the ListView in Xamarin.Forms 1.4 and am wondering if there is a way to remove the header (and footer, for that matter...) from my ListView. As it is functioning "out of the box", I have extra white space at the top of my ListView, which if...

Xamarin Forms Android Error: Please install package 'Android Support Library'

xamarin,monodroid,android-support-library,appcompat,xamarin.forms
I recently uploaded my project to Git, and used a auto-generated Xamarin/Windows/MacOS/VisualStudio .gitignore file. I did a lot of work and testing on iOS, but now I'm coming back to android but upon building the Project.Droid version, I get the following errors: Error 11 Please install package: 'Android Support Library'...

Xamarin Forms Relative Layout won't stack

c#,xaml,xamarin,relativelayout,xamarin.forms
With the following code: <ScrollView Orientation="Vertical" Padding="0"> <RelativeLayout BackgroundColor="Red" Padding="0"> <BoxView Color="Blue" WidthRequest="100" HeightRequest="100" RelativeLayout.XConstraint="{ConstraintExpression Type=Constant, Constant=0}" RelativeLayout.YConstraint="{ConstraintExpression Type=Constant, Constant=0}" /> </RelativeLayout> <RelativeLayout BackgroundColor="Green" Padding="0"> <BoxView Color="Yellow" WidthRequest="100" HeightRequest="100"...

Xamarin.Auth OAuth2Authenticator Facebook NullReferenceException

xamarin,facebook-login,xamarin.forms,xamarin.auth
I have created a function to login using Facebook. public void Login () { var ctx = Forms.Context as MainActivity; var accounts = new List<Account>(AccountStore.Create (ctx).FindAccountsForService (SERVICE)); if (accounts.Count == 1) { GetAccount (accounts [0]); return; } var auth = new OAuth2Authenticator ( clientId: FBID, scope: string.Empty, authorizeUrl: new Uri...

Choose Solution type in Xamarin.forms

xamarin.forms
I am new xamarin.forms framework, When I started to work for cross platform application for making new solution (new solution->mobile apps), I got following three options for moving further: Blank App(Xamarin.Forms Portable) Blank App(Xamarin.Forms Shared) Class Library(Xamarin.Forms Portable) After investigating a lot, among those i did not create any difference....

How to set ItemsSource of ListView?

c#,xaml,monotouch,xamarin,xamarin.forms
Here I have defined my data myListOfEmployeeObjects: public class App : Application { public List<Employee> myListOfEmployeeObjects; public App () { Employee emp1 = new Employee () { FirstName = "Max", LastName = "Mustermann", Twitter = "@fake1" }; Employee emp2 = new Employee () { FirstName = "Evy", LastName = "Mustermann",...

Activity Indicator in Xamarin.Forms.Labs

mvvm,xamarin.forms,xamarin.forms.labs
I am using Xamarin.Forms and Xamarin.Forms.Labs 1.2.1 and it's MVVM framework. If I set the IsBusy property of my model view to true to display activity(long-process) indicator, I see indicator on toolbar. How can I display of the activity indicator in the middle of my content page? I don't like...

How to show iOS add contact screen from Xamarin Forms?

xamarin,monotouch,xamarin.forms
I'm trying to show the iOS add contact screen using Xamarin Forms. From what I can see Xamarin Forms does not support this out of the box but Xamarin iOS does. Unfortunately I can't get them to work together. What I mean by "together" is that I need get access...

Hide softkeyboard in Xamarin

c#,android,xamarin,monodroid,xamarin.forms
How do I hide the softkeyboard for showing up when focusing an Entry in Xamarin.forms portable forms project? I assume we have to write platform specific renderers for that, but the following does not work: I create my own entry subclass: public class MyExtendedEntry : Entry { } and then...

Xamarin forms Label new line

xamarin.forms
I have a Label in my Xamarin forms page, that receives it's Text from it's view model, and the text contains the \n character. How can I make the Label to automatically split the text into two different rows?

Xamarin Forms compilation error in visual studio

visual-studio-2013,xamarin,xamarin.forms
I am trying to make a simple xamairn form apllication by folling steps l after creating project when compile it ...

Xamarin Forms: how to implement platform specific code

c#,audio,xamarin,cross-platform,xamarin.forms
I do have a Xamarin Forms project where I want Android, iOS and WinPhone as targets. (Right now I only look at Android.) I am having trouble playing Audio and think I will need to implement it differently on each device. I started with adding this code in the app.cs...

Xamarin Forms: How can I add padding to a button?

xaml,xamarin,mono,monotouch,xamarin.forms
I have the following XAML Xamarin.Forms.Button <Button Text="Cancel" BackgroundColor="#3079a8" TextColor="White" /> I tried to add padding to it via the Padding property but that didn't work. After checking the forums and the docs, I realised there is no padding property in the documentation for Xamarin.Forms.Button (link to the docs) ,...

Xamarin Forms Windows Phone MasterDetailPage - Remove default ApplicationBar icon

c#,windows-phone-8,xamarin,xamarin.forms,master-detail
When using a MasterDetailPage in Xamarin Forms, the Windows Phone renders this as a Panel which displays by hitting an icon on the ApplicationBar. Is there anyway to remove this icon and hookup the panel display event to a different button?

Xamarin.Forms: Call to a API using ServiceStack throws exception

c#,xamarin,servicestack,xamarin.forms
I have a local service made with ServiceStack and I want to call a method from my Xamarin.Forms application: ServiceStack.JsonServiceClient sc; sc = new ServiceStack.JsonServiceClient("http://api.sportsstars.local/"); When the debugger reaches the second line, it throws this exception: System.TypeInitializationException: An exception was thrown by the type initializer for ServiceStack.ServiceClientBase Any ideas what...

Set background color depending on data-bound value

xaml,binding,xamarin,xamarin.forms
I've seen some answers before but nothing really helped me out. I also have a class DecideModel (This will be a dataset retrieved from DB, but for purpose of this question, I have added an ObservableCollection) which contains static DecideModel() { All = new ObservableCollection<DecideModel> { new DecideModel { DatePerformed...

Xamarin.Forms How to save model to database without savebutton, Best practises

xamarin,xamarin.forms
My colleague and I want to create an application with some pages, where the user is allowed to change some settings. These settingspages do not have savebuttons. There is a main settingspage and two child settingspages. The settings should be persisted if the user navigates back from one of the...

Cross-platform image name?

xamarin,cross-platform,xamarin.forms
I have some xaml markup to specify the image file based on a binding. <Image Grid.Row="0" Grid.Column="3" Source="{Binding ImageSource}" VerticalOptions="Center"/> My model class has this to return the file name: public string ImageSource { get { return (PaymentType == PaymentType.Check ? "check" : "card"); } } This works great for...

Cell-reusing issue with list view and view cells with custom renderer

c#,ios,xamarin.forms,renderer
I'm trying to display a list view with cells that are rendered with a custom iOS renderer. When scrolling the list, there are nasty overlays (as shown below). I boiled it down to the following lines of code. The App contains a ListView with its ItemsSource set to a dummy...