Join Xamarin at Microsoft Ignite in Chicago, IL from May 4-7, 2015. Key members from the Xamarin team will be available to answer your questions, discuss your apps and projects, and show you what’s new across our products. James Montemagno, Xamarin Developer Evangelist, will be delivering two talks this year: Go Mobile with C#, Visual […]
James Montemagno recently blogged about More Material Design for Your Android Apps. In the post, James discussed two controls that he has built around Material Design components. One of the components is the Floating Action Button (FAB).
Let’s see how we can pull this control into use with Xamarin.Forms.
Pull in the Component
Build a Custom Control
For the FAB’s properties to be bindable in Xamarin.Forms, we need a custom control with bindable properties.
We will then map each property to a corresponding property on the native FAB control.
Attach a Renderer
If we want to use a native control in Xamarin.Forms, we need a renderer. For simplicity, lets use a
ViewRenderer. This renderer will map our custom
FloatingActionButtonView to an
Pull it all Together
OK! We’ve built the custom control, and mapped it to a renderer. The last step is laying out the control in our view.
You can pull the completed sample application from GitHub.
Applications and businesses live on data. Data is what makes a business a business, generates value for customers, and allows a company to generate income. Displaying data to a user is a common operation, especially in mobile. It might be immensely important for a salesperson to get the last bit of information before visiting a client or to display the location of a restaurant via a local consumer-oriented app. In this article, I’ll look at the UITableViewController class that allows you to get at and display that data in an iOS app.