Recent articles


Transform Floating Action Button into Toolbar in Xamarin.Forms

Posted by seven.srikanth@gmail.com at 28 May 2018 in Article


There are numerous popular port of floating action button from native to Xamarin.Forms i will not enumerate it here, Ever wonder how to create one without dependencies to this libraries?  Just by using existing api in Xamarin.Forms you will certainly can.  We will make it more fancier by transforming your FAB into a toolbar with a smooth animation (yes smooth animation without using Lottie library). Screenshots

Conceptualizing the transform

Now let start by taking an inspiration from the Android material animation technique, There are actually lot of resources to choose from, but i got one from here which pretty awesome. I think there were concepts which i think we can achieve just by using the XF's current api's without the need for third party libraries like Lottie or other popular libraries but of course Lottie is just way too awesome if you have Adobe after effects artists in your team.

Implement the awesomeness

Along the way i have encounter a lot of challenges, The first thing is how to make the animation as smooth, I tend to have done a lot of animation extension only to find out i would only need the existing animation extension from Xamarin.Forms. You will also have to figure out how animation runs in-order and in-parallel and you would also have to consider the in-between trigger of animation which is quiet challenging. Structure of the Xaml UI We will take the button on the center of the screen, so regardless on the screen size it will always be on the center. Then on our backend code we will call InitializeButton inside the OnAppearing method, this will calculate the location of the button in the bottom right part of the screen. I know you wonder why should i need to calculate this when we can do it by having the StackLayout in HorizontalOptions and VerticalOptions set to "End". The fact of the matter is, I have already tried it and i have figure out it would have less calculation and much simplier to manipulate. Now our bread and butter of the concept lies in the default animation extension provided by Xamarin.Forms.

See it in Action

The sample project is built with .Net Standard and im using Prism + DryIOC but it was not utilized in this presentation. This is also tested in the UWP project and should work fine.

Wrapping Up

The awesomeness are overloading on this sample code, so go ahead and dig deeper. Feel free to tweak this project to suit your need. If you have some questions go shoot me a message here and will gladly answer your questions. If you want more and advance topic you can catch us at this facebook groups  MondPH And Xamdavao.  If you want the full sample source you can check it right here LINK. enjoy coding.

Tags: Transform Floating Action Button into Toolbar in Xamarin.Forms




Revisiting Custom Dialog in .NET Standard version (Xamarin.Forms)

Posted by seven.srikanth@gmail.com at 28 May 2018 in Article


Overview


In the previous article (Link Here), We have created a custom Popup Dialog which can have any complex UI view we like to add as a content. So we made a custom dialog made purely in xaml without custom renderer. Again, you read it right its pure xaml. We would like to revisit is again and migrated it to .Net Standard and Prism. And we have made  little improvement to add some useful features. It only support iOS and Android and is fully tested.





How To use


Just copy the source implementation of PopUpDialogView just like you see in the screen below, you can customize it to conform with your design Or may add another animation transition during show and hide. You would notice that we've added some bindable properties like DialogMargin, BackgroundOpacity, IsShowBackground, ShowDialogCommand, HideDialogCommand.

I have a couple of samples in using the properties in the project (link will be provided at the bottom of this article) Which is pretty self-explanatory. The good thing is you can add your own feature since the source is provided. The good news is the elements inside the Popup is bindable to the pages BindingContext.






Wrapping Up


The awesomeness are overloading on this sample code, so go ahead and dig deeper. Feel free to tweak this project to suit your need. If you have some questions go shoot me a message here and will gladly answer your questions. If you want more and advance topic you can catch us at this facebook groups  MondPH And Xamdavao.  If you want the full sample source you can check it right here LINK. enjoy coding.
Source: http://winstongubantes.blogspot.in/2018/05/revisiting-custom-dialog-in-net.html

Tags: Custom Dialog




Learn Xamarin in simple and easy steps starting from basic to advanced concepts

Posted by seven.srikanth@gmail.com at 24 May 2018 in Tutorials


#Xamarin is a cross-platform development solution for creating #Android and #iOS apps. In Xamarin Tutorial, building a solution that can be used as a starting point for cross-platform applications using the Xamarin toolset. Learn Xamarin in simple and easy steps starting from basic to advanced concepts in this article.
https://www.redbytes.in/xamarin-tutorial/ 

Tags: Learn Xamarin