Custom editor render for Xamarin on iOS

In Xamairin the Editor component doesn’t have a border on iOS. If you want to add one in the iOS project just added the following code. using UIKit; using WordBankEasy.iOS.Renderers; using Xamarin.Forms; using Xamarin.Forms.Platform.iOS; [assembly: ExportRenderer(typeof(Editor), typeof(CustomEditorRenderer))] namespace PSC.iOS.Renderers { public class CustomEditorRenderer : EditorRenderer { protected override void OnElementChanged( ElementChangedEventArgs<Editor> e) { base.OnElementChanged(e); if(Control…

Read More

Preserve data when deploying Xamarin.Android app

By default all your data from your previous runs is deleted when you’re deploying an Xamarin.Android app. In many cases you don’t want the data to be deleted. Visual Studio To preserve data go to Tools -> Options -> Xamarin -> Android Settings and check “Preserve application data/cache on device between deploys”. Xamarin Studio To…

Read More

What is the difference between Xamarin.Form’s layout options?

In Xamarin.Forms every View has the two properties HorizontalOptions and VerticalOptions. Both are of type LayoutOptions and can have one of the following values: LayoutOptions.Start LayoutOptions.Center LayoutOptions.End LayoutOptions.Fill LayoutOptions.StartAndExpand LayoutOptions.CenterAndExpand LayoutOptions.EndAndExpand LayoutOptions.FillAndExpand Apparently it controls the view’s alignment on the parent view. But how exactly is the behavior of each individual option? And what is…

Read More

Android required permissions

In Visual Studio 2015 if you checked same permissions on your project properties and when reopen it, your checks are disappeared, you have two ways: Is the manifest file marked as ‘read only’ in Windows Explorer? You have to select the Properties directory and un-tick ‘read only’ for the entire folder. Add manually in AndroidManifest.xml…

Read More

Custom ContextAction with Xamarin Forms

I using a Xamarin Forms ListView and I want to enable or disable the Context Actions based on a certain binding or in the code behind. The way I found is to use BindingContextChanged in a ViewCell. I show you an example <?xml version=”1.0″ encoding=”utf-8″ ?> <ContentPage xmlns=”http://xamarin.com/schemas/2014/forms” xmlns:x=”http://schemas.microsoft.com/winfx/2009/xaml”> <ContentPage.Content> <StackLayout> <ListView x:Name=”listDictionaries” ItemsSource=”{Binding DictionariesList}”…

Read More

Android.Content.Res.Resources+NotFoundException: Resource ID #0x0

I’ve just created a simple MasterDetailPage and in the code I inserted an icon for the left page with: public MainPage() { InitializeComponent(); BackgroundColor = Color.FromHex("#007acc"); Icon = "settings.png"; } I tried to deploy my app on an Android emulator but I can’t deploy it because Android.Content.Res.Resources+NotFoundException: Resource ID #0x0. I checked everthing and evething…

Read More

Visual Studio updates Xamarin

When you open Visual Studio 2015 and there is a pop windows to invite you to click on it for updating Xamarin and you click, nothing happends. There is a bug but clicking the update available popup was fixed in one of the recent releases. You can manually update in the Options menu under Tools….

Read More