James Montemagno
James Montemagno

Live, Love, Bike, and Code.

Tags


James Montemagno

Xamarin.Forms

Xamarin.Forms: How to Clip Images with Rounded Corners

I love watching trends in mobile design. Currently gradients are all the rage, but two trends that have been around for a while are rounded corners and circular images. A long time ago I created the Circle Image plugin [https://github.com/jamesmontemagno/ImageCirclePlugin] for Xamarin.Forms that many developers know and love, but did you know that you can just use built in controls to get a circle or rounded corners? All you have to do is use a frame [https://docs.microsoft.com/xamarin/xamarin-f…

James Montemagno James Montemagno

Add ASP.NET Core's Dependency Injection into Xamarin Apps with HostBuilder

Dependency injection(DI) and inversion of control (IoC), have been a recurring theme in questions that I have received over the last six years. Sometimes it is around using constructor injection(), simple service containers, and often around full frameworks such as Prism or MVVM Light. I will be honest with you, I have never been a fan of DI/IoC when building mobile apps. My main reason is that there has never been any official pattern or recommendations from Google or Apple (or Microsoft/Xamari…

James Montemagno James Montemagno

Optimizing Xamarin Apps & Libraries with the Linker

The Xamarin linker is one of the most important pieces of technology when building mobile apps, that no one knows exists. It does all of the hard work for you, stripping out all unused code from libraries that you include in your apps. It should only be used in release mode as it takes extra time to compile your app, but means that your app will be smaller: The linker has specific implementations for both iOS [https://docs.microsoft.com/xamarin/ios/deploy-test/linker?WT.mc_id=docs-montemagno-…

James Montemagno James Montemagno

Hangout, Drink Coffee, & Cycle with Me at Build 2019

Microsoft Build 2019 is right around the corner (not only from where I live, but also it starts next Monday), so what better time to plan some meetups with awesome .NET developers <3. There will be tons of awesome sessions, the Xamarin booth, but also tons of coffee drinking with me, and even a bike ride opportunity. Here is my schedule for Build! Monday May 6th * 7am - 8am: Early Morning Coffee (pre-keynote): Monorail Espresso [https://www.google.com/maps/place/Monorail+Espresso/@47.6…

James Montemagno James Montemagno

Using Font Icons in Xamarin.Forms: Goodbye Images, Hello Fonts!

Updated: See the newest way of importing fonts with Xamarin.Forms 4.6 on my latest blog post [https://montemagno.com/xamarin-forms-custom-fonts-everywhere/]. My full walkthrough: My entire mobile development career I have gone all in on using device specific images and icons. These are properly scaled and sized images that fit @1x, @2x, @3x, hdpi, xhdpi, xxhdi, and so on, which are great because they are super optimized for each platform. The reason I do this was because it gives very consist…

James Montemagno James Montemagno

The Beautiful & Complex FlexLayout Comes to Hanselman.Forms

Last week I wrote about my new quest to fully optimize and enhance Hanselman.Forms [https://montemagno.com/updating-hanselman-forms-bottom-tabs-bindable-layout/]. This involves using the latest and greatest in Xamarin.Forms and Xamarin.Essentials, but it also means spicing up the app with some lovely visuals and design. My first quest was to re-design the podcast section of the mobile app to create a list in grid form of different podcast that Hanselman produces. So, first things first we shoul…

James Montemagno James Montemagno

Control Text Size on Android Bottom Navigation View

It seems as though my obsession with the Android Bottom Navigation View aka Bottom Tabs will never end! This time I got a question about controlling the size of the text when the user taps on a tab. The default behavior is to zoom in on the text: Inside of your Android project's Resources/values folder create a new file called dimens.xml if it doesn't exist. Then add the following XML to override the size of the text when it is active and not active: <resources xmlns:tools="h…

James Montemagno James Montemagno

Modernizing Hanselman.Forms: A Customizable Brand Mobile App

The night before we launched Xamarin.Forms in mid-2014, I was having a conversation with Nat about creating a nice out of the box real world example of a Xamarin.Forms app. We discussed several different app ideas, but we were short on time as it was already 8PM at night. Then I thought perhaps I could create an app for my idol and fellow Chipotle lover Scott Hanselman. Fast-forward 8 hours and several cups of coffee later and Hanselman.Forms was born [https://www.github.com/jamesmontemagno/Hans…

James Montemagno James Montemagno