Here's a F# inspired Result type implemented in C#: public class Error { public Error(string error) => Value = error; public string Value { get; } } public class Result<T> { readonly string _error; public Result(Error error) => _error = error.Value; public Result(T value) => Value = value; public bool IsSuccessful { get => _error …
Implementing a custom Checkbox control
Building a Custom Checkbox Control This post is a code dump for a custom checkbox control. There's four main parts for this: Custom Control * Bindings * XAML Host Page * XAML * Viewmodel Bindings XAML Host Page Viewmodel
Xamarin.Forms: ShellContent Navigation
Intro I came across a scenario in which my app exposed multiple methods for navigating to a particular page. Method 1: XAML One exposed method was from the app menu in which the navigation was implemented in XAML: Method 2: Code-behind of Initial page Another exposed method was to perform navigation from another page's code-behind: Method …
Implementing a (FP inspired) Result type in C#
The following is a Result class: Here's a Service class: Here's some tests:
Talking to Bryan about Staying Current
Xamarin.Forms – Obfuscate Bankcard Number
Xamarin.Forms: Validation using Behaviors
xmlns:converters="clr-namespace:Account.UI.Converters"
Xamarin.Forms – Implementing ItemsSource for Custom Control
Here's some code for ItemsSource:
Xamarin.Forms Responsive Layout from Device Rotation
Intro This is a brain dump on implementing a responsive layout based on a device being in Portrait or Landscape mode. In summary, I used a ContentView's ControlTemplate to host a layout that depends on a device being in Portrait or Landscape mode. In addition, I then overrode the OnSizeAllocated method on the ContentPage. XAML …
Continue reading "Xamarin.Forms Responsive Layout from Device Rotation"