Posts

Showing posts from February, 2016

Xamarin Forms: FloatingTextEntry Control

Image
This is a very beautiful extended Entry control for Xamarin.Forms that allows devs display TextInputLayout(Material Design)-like this is the control usage and setup: And the result is the next: Download the code source from here: https://github.com/AlejandroRuiz/FloatingTextEntry

Xamarin Forms: StatesButton Control

Image
The default Button from Xamarin.Forms don't allow to set the states image resources for it, that is the reason that i decided to create a new button trying to keep all default button properties/methods/handlers with the three common states (normal, pressed and disable), the usage is very simple: And the result is the next Full Code Project: https://github.com/AlejandroRuiz/StatesButton Nuget Package: https://www.nuget.org/packages/StatesButton.Forms

Xamarin.Forms: Get native image from ImageSource

Image
Sometimes we need to implement images in our custom renderers and as a first solution most of developers take the decision to use a string property but for me is not the better and standard way to manage image resources on Xamarin.Forms, in this blog we will take a look to a helper class that help us to manage images resource on your Xamairn.Forms renderers using a IImageSourceHandler. There are three IImageSourceHandler helper classes: 1. ImageLoaderSourceHandler: Handle the Uri resources 2. FileImageSourceHandler: Handle the local/embed resources 3. StreamImagesourceHandler: Handle the stream image resources The first that we need is to check what kind of source have your ImageSource property using the next code after this, with the returned IImageSourceHandler you can call the LoadImageAsync and passing the source that you want to be native and this method will be return for you an UIImage for iOS or a Bitmap for Android Real World Example: "HeartBeatView" Control Now we...