Showing part of a label as a clickable link, has been a long desired feature of Xamarin.Forms. With the release of 3.2.0, this is now possible. This was one of the more complex PRs (PR 2173) I completed, and I will go through the design decisions and why at the end. This is currently supported […]
ImmutableUI and TDD with Xamarin.Forms
MVVM and XAML has failed me. A promise of abstracting to make reusable components, but they never get reused. Layers of complexity for virtually no benefit. If reuse is to happen as planned, it would require almost mystical level foresight into the future, across multiple projects. In the real world, our apps are self contained, […]
Taking a Screenshot in Xamarin.Forms
There may be a few occasions when you want to take a screenshot of your app, such as for sending to support. Xamarin.Forms doesn’t have this functionality; hence we will have to create a custom renderer for iOS and Android to capture the screen. Interface and Dependency Injection If we want to use this in […]
Masked Entry in Xamarin.Forms
A mask on an entry field is way to format the input into something more human readable. For example, a phone number may look like +61 400 555 555, or (555) 555-555. There are many ways to implement a mask. For maximum configurability, you would use Regex, however for most simple cases, we can implement […]
Create a PWA in Xamarin.Forms with Ooui.Wasm
Ooui is a framework created by Frank Krueger, that lets you run Xamarin.Forms in a web browser. It actually has two ways of doing this, Ooui.AspNetCore, which is server side, or client side, using Ooui.Wasm. WASM is short for WebAssembly and to put it simply, it lets you run compiled code in the browser. Mono […]
Functional ViewModels in Xamarin.Forms (Revision 3)
This is the 3rd revision in attempt to create a more functional ViewModel. If you want to see my previous posts, please look at. Functional ViewModels In Xamarin.Forms (Revision 2) More Functional ViewModels In Xamarin.Forms With C# Here is the revised setup: XAML Your XAML page already holds the visual state, there should be no […]
Functional ViewModels In Xamarin.Forms (Revision 2)
Following on from my More Functional ViewModels In Xamarin.Forms With C# I went further to refactor and see if I could develop a solution that was actually less lines of code to write, and overall, I did succeed. My functional ViewModel basically goes like this: Standard ViewModel Here is what the XAML and ViewModel look […]
More Functional ViewModels In Xamarin.Forms With C#
Xamarin.Forms is designed around MVVM, a two-way binding between a View and ViewModel. But with this comes an array of potential state issues. You have no control over the flow and timing of Visual State updates to your ViewModel. Hence, I decided to see if I could develop an easy enough way to overcome some […]
Resilient Network Connectivity In Xamarin.Forms
Mobile networks are among the least reliable type of network, and your app will likely have to communicate over it, to function. But considering the potential for disruption, we have to ensure our app can accommodate any poor network conditions. HttpClient In most cases you will connect to an API via the HttpClient, like this: […]
Time zones in Xamarin.Forms
Time zones conversions are sometimes required in mobile apps from your local time zone to another, non-UTC time zone. Time zones can be tricky due to daylight savings, meaning an offset from UTC can change during the year for a particular location. Politics can even skew this further by making daylight savings changes, as to […]