Adam Pedley

About Adam Pedley

Microsoft MVP | Xamarin MVP | Xamarin Forms Developer | Build Flutter

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, […]

Read More >

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 […]

Read More >

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 […]

Read More >

Workflow Controller in Xamarin.Forms

One of the main issues I am seeing with large projects, is controlling the workflow of pages. The complexity continues to increase as more pages can link to and from it. It also occurred to me that keeping navigation inside the ViewModel, only seems to tie the ViewModel to other pages, rather than keeping it […]

Read More >

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 […]

Read More >

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 […]

Read More >

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 […]

Read More >

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 […]

Read More >

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: […]

Read More >

Running an OSS Community Sprint

Open source software is great for developers. It lets you see the internals of framework or app, and know how to best interact with it. On top of this, we can also submit code to be included, and comment on code the core maintainers are submitting. Getting developers not normally engaged in the process, to […]

Read More >