Top

xamarin Tag

Using Effects on Xamarin.Forms

Custom Renderers are useful when we want to customize native controls of a given type all around our app.But when we want to customize only some specific properties of a given native view, we could make use of Effects. An Effect is a simple and reusable piece of code that will allow us to access a native control to customize it.   Let's see a sample that will prevent the underline decoration when an Entry is focused. Core project In the core project add a class inheriting RouttingEffect like this: public class NoUnderlineEffect : RoutingEffect { public NoUnderlineEffect() : base("Blogpost.NoUnderlineEffect") { } } We could add properties to be able to pass parameters and...

Custom Renderers are useful wh...

Read More

Use Microsoft Authentication Library(MSAL) in Xamarin.Forms

INTRODUCTION   Most users prefer to login with Facebook, Microsoft, Google or Twitter than using registration forms. That's why it's important to know the options and what each one of the authentication libraries offer us. Let's talk about Microsoft Authentication Library (MSAL), Perhaps, at user level is not very well known but at the business one is the most important. Many companies around the world have their employees registered in Active Directory (AD) and MSAL offers us the chance to employees with your business emails can access the applications.   Note: More than 65% of users prefer to use login with providers than to use our registration form.   PLATFORMS   MSAL is available for Android , iOS , Java , Python, Angular , NodeJS , PHP , JS and every .NET...

INTRODUCTION   Most use...

Read More
SmartHotel360 UI Test Run

Automate the UI testing of your app with Xamarin.UITest for Xamarin.Forms – A practical implementation

Introduction   Testing your apps must be a go-to if you plan to ship quality applications. You can unit-test your code for flaws in the logic side of the solution. That kind of tests are extended, and there is plenty of frameworks you can use. In essence, unit tests are more coupled to the language, but UI Tests are platform independent. Some scenarios you can find mobile UI tests useful: Verify bug regressions Prove that a bug has been resolved Check app UI behaviour in different screen sizes / OS versions Automate app navigation for screenshots Check for validations Xamarin.UITest is an automation library that can be used as...

Introduction   Testing ...

Read More

Interact with Javascript from C# using Xamarin.Forms

In one of our projects, we needed to make a navigation from a page that only contains a WebView rendering a web page, but only the web page knew when that behavior must happened, there is no way to know from the app point of view when it should happen, so we needed to call a C# method from the Javascript code of a web page.   How did we did it?   Hopefully we found this: https://docs.microsoft.com/es-es/xamarin/xamarin-forms/app-fundamentals/custom-renderer/hybridwebview   The idea is: A Xamarin.Forms View that contains the Url of the web page to load, and the method we want to call from Javascript. A renderer for each platform that will make the magic on every platform. public class HybridWebView :...

In one of our projects, we nee...

Read More

Grial UIKit review

A few weeks ago we got access to the Regular version of Grial UIKit for Xamarin.Forms. Grial UIKit comes with more than 30 awesome Xamarin.Forms' XAML screens which showcase this Xamarin Component, as well as, support for customization capabilities of Xamarin default controls, providing and unified Grial Theme that looks and feels great on every platform. Introduction Here, in Plain Concepts, we are always eager to leverage every platform in which we develop our apps for. We try to know as close as we could the strengths and weaknesses of the native UI frameworks of our platform apps, its customization capabilities, etc...

A few weeks ago we got access...

Read More

Initial Steps with Xamarin.UITest for Hybrid Apps

Recently we have used Xamarin.UITest to validate the UI of an app developed with Cordova, and Test Cloud to run such on a lot of physical devices. Assuming you have already experience creating a Xamarin.UITest project, the very first thing you will need to play with is running an emulator or a physical device to deploy the app and run the tests. Such is done with this very simple piece of code: [code language="csharp"] public class AppInitializer { public static IApp StartApp(Platform platform, Xamarin.UITest.Configuration.AppDataMode mode = Xamarin.UITest.Configuration.AppDataMode.Auto) { if (platform == Platform.Android) { return ConfigureApp .Android .EnableLocalScreenshots() .ApkFile("../../../Apps/myapp.apk") .StartApp(mode); } return ConfigureApp .iOS .EnableLocalScreenshots() .AppBundle("../../../Apps/myapp.app") .StartApp(mode); } } [/code] Please take note we are going to test the UI of a multiplatform app developed with Cordova for iOS and Android, so we decided to have a single...

Recently we have used Xamarin....

Read More

Continuous delivery for Xamarin.iOS projects with TeamCity, FAKE and HockeyApp

With this new post we are going to learn how to add continuous delivery to a Xamarin.iOS project. Main components are FAKE as build automation system, TeamCity as continuous integration and deployment server and HockeyApp as storage, distribution and notification service of our client deliveries.         The advantages of continuous delivery are huge, provides visibility to projects that make use of it and speed up their development process, apart from saving time turning the delivery management into an easy task. I suppose the reader of this article has some experience configuring projects and build configurations in TeamCity. These are the ingredients and cooking procedure: -A Mac/Mac Mini with OSX and Xamarin.iOS installed. (Check you have mono and curl in your PATH environment variable) -Install TeamCity Agent in OSX. (I suggest you to install it as a login item, to ensure it gets executed...

With this new post we are goi...

Read More

Linker experiences with Xamarin.iOS

We experienced some problems in one of our latest projects with Xamarin.iOS, the kind of problems that are normally accompanied by a big headache. While everything worked like a charm over iOS simulator, something started to crash when running the app over a physical device. It was a simple app consuming data from a web service and being displayed via Master Detail pages with standard views so, what could be wrong? Thanks to output log while debugging over device, we found that there were some errors - with their stack trace information - from System.Data.Services.Client assembly. That component calls some reflection methods and this is why it was failing, just take a look to the next image. If you have a...

We experienced some problems i...

Read More

Branding a Xamarin.Forms app on Android: Accent Color

Here we are going to start a series of articles with some tips to brand our Xamarin.Forms app.
In this case, we are going to talk about how to apply our accent color in some parts of our Android one.

Using Android Styles
The easiest way to apply our brand color is creating a custom Android theme.

For example: if we have a simple Entry, the result Android control is showing the default colors. A focused Entry control looks like:

image1