Skip to content

Instantly share code, notes, and snippets.

View HenKun's full-sized avatar

Henning Kuntzschmann HenKun

View GitHub Profile
@HenKun
HenKun / Readme.md
Last active April 25, 2019 13:34
MarkupExtension for Xamarin.Forms to have simple XAML inline converter

This is a simple MarkupExtension for Xamarin.Forms that imitates an if-else-statement. It was inspired by Thomas Levesque on https://stackoverflow.com/a/841894/6884587

Usage:

  1. Include xmlns:ext="clr-namespace:Xamarin.Forms.Extensions"
  2. Use on a bindable property: <Label Text="{ext:SwitchBinding IsLoggedIn, True=Log out, False=Log in}" />

You can also add a StringFormat: