James Montemagno - Page 17

Live, Love, Bike, and Code.


My Favorite C# 7 Feature: More expression-bodied members

I can’t help myself, I love Expression-Bodied Members from C# 6! Combined with other powerful C# features it took this code: public void OnPropertyChanged(string name) { var changed = PropertyChanged; if(changed == null) return; changed(this, new PropertyChangedEventArgs(name)); } to this: public void OnPropertyChanged(string name)=> PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); This is …

James Montemagno

Getting Started with the Xamarin Live Player

Getting started, step by step, in under 15 minutes! Yesterday, we announced the Xamarin Live Player for both iOS and Android which includes the Live Player Extensions for both Visual Studio 2017 and Visual Studio for Mac enabling you to get started with mobile development with just a device! The Live Player apps let you debug your apps and make live edits and see them reflected live on your device. Your code runs …

James Montemagno

Introducing Coffeehouse Blunders, Chess + Tech Podcast

I could not be more excited to announce my latest podcast adventure with my good friend and International Chess Master, Daniel “Danny” Rensch that we call Coffeehouse Blunders. Join us each week on Coffeehouse Blunders as we discuss the latest in chess, coffee, tech, and anything else happening in our wonderful lives and around the world. Danny’s life as an International Chess Master collides with my mobile …

James Montemagno

Important OnPlatform Changes in Xamarin.Forms

Last week I blogged about the important changes to Device.OS in the latest version of Xamarin.Forms. Well, I am back with some other changes from that same exact Pull Request that have to do with OnPlatform in code and XAML that use the new Device.RuntimePlatform. So, what is OnPlatform? It allows you to set properties on elements or run specific code based on specific platforms. This is really nifty for tiny tweaks …

James Montemagno

Using Visual Studio Mobile Center with a Azure DevOps (VSTS) Code Repo

So, this is pretty awesome! Today, the Mobile Center team rolled out a huge update to Visual Studio Mobile Center enabling you to build your iOS and Android apps in the cloud from any GitHub, BitBucket, or Azure DevOps (VSTS) code repository! This is great because VSTS offers FREE unlimited private repos for your code with a git backend. Mobile Center offers up build, test, distribute, analytics, and backend services …

James Montemagno

Device.OS is Obsolete in Xamarin.Forms... What to do?!?!

If you just updated to Xamarin.Forms 2.3.4 you may have noticed and be freaking out that you have tons of green squiggles that Device.OS and TargetPlatform are obsolete. This was all done in regards to the new changes for OnPlatform. We can see here that it says to use RuntimePlatform isntead, which is a string… but how do you use it??!?! If you hover over TargetPlatform, and enum, it doesn’t tell you what to replace …

James Montemagno

Twitter Lite - Progressive Web Apps - The Good, Bad, & Ugly

Twitter recently launched Twitter Lite a stripped down “faster” and more “data friendly” version of their mobile app and refresh to their mobile website. It is more than just a new mobile website, it really is a Progressive Web App (PWA) that offers up notifications, camera integration, and some of the common features of twitter such as timelines, tweeting, and direct messages. It also benefits from being really …

James Montemagno

Unit Testing Plugins for Xamarin

So you love unit testing…. said no one ever, but you are forced to write unit tests and you want to use Plugins for Xamarin which are all singletons and need platform specific implementations or they will throw an exception in your tests…. what to do?!?!? Plugins are all interface based, which means all we have to do is use standard practices to not directly call the singleton, and setup our code to return the …

James Montemagno
James Montemagno
Author

James Montemagno

James Montemagno is a Principal Lead Program Manager for Developer Community at Microsoft. He has been a .NET developer since 2005, working in a wide range of industries including game development, printer software, and web services. Live, Love, Bike, and Code.

Milli the dog peeking up from the bottom of the page