Rowena  Cox

Rowena Cox


Using ValueConverters in Xamarin.Forms XAML

ValueConverters can be a very powerful tool whenever you start working with Xamarin.Forms and XAML. You all probably ran into the situation where you got a weird value from your backend and needed to convert that into something else to show it on screen.

In this video that is exactly what we will see. For the example I will turn a string value into a color by implementing a ValueConverter in XAML. We will also look into ConverterParameters briefly, although that doesn't seem to end very well...

🔗 Links
Sample code repo:
Xamarin Forms Repo:

⏱ Timestamps
0:00 Intro
0:33 Sample App Outline
1:30 Implement Some UI
2:15 Implement Sample Class
2:39 Free Pro-Tip for Adding Properties!
3:58 Implement More Sample Code (Data-Binding, Don't be Scared!)
7:21 ValueConverter (String to Color) Implementation
8:00 Implement IValueConverter Interface
9:20 Implement Convert Method
11:45 Add ValueConverter to XAML
14:06 Run Sample App
15:00 ConverterParameter with Binding (Doesn't Work! Epic Fail 🤦‍♂️)
18:03 ConverterParameter with Static Value
18:37 Outro


What is GEEK

Buddha Community

Using ValueConverters in Xamarin.Forms XAML

How to Design Login Page using Xamarin Forms C# | Login Form | Sign In UI Design


#xamarin forms #xamarin forms bangla tutorials for beginners #xamarin forms tutorials for beginners #xamarin #xamarin.forms #xamarin.forms ui

Gaurav Singh


Xamarin Forms Training Institute | Xamarin Forms Development Classes | Xamarin Training

In this Xamarin Online course, you will learn each and every topic with the help of hands-on labs. This program includes a hands-on live project with the implementation of recommended design patterns and practices. The learning path for this program is given below:
Xamarin Training objective
At the completion of this course, attendees will be able to;

  1. Understand Xamarin architecture
  2. Understand Xamarin .Android, Xamarin. iOS fundamentals
  3. Understand Xamarin. Forms fundamentals
  4. Build UI with XAML and code
  5. Work with images, display data beautifully and create interactive lists
  6. Implement multi-page apps with navigation, tabs, master/detail pages
  7. Store and retrieve data from a variety of sources like file system, SQLite database and RESTful services
  8. Implement MVVM pattern

#xamarin training #xamarin course #xamarin forms course #xamarin online course #xamarin forms training #xamarin training course

How to use Picker in Xamarin Forms | ComboBox | Dropdown | DropdownList


#xamarin forms #xamarin #xamarin.forms #xamarin tutorials #xamarin tutorials for beginners

Shawn  Durgan

Shawn Durgan


Learn How to Add App Themes for Xamarin.Forms

All major OSes now support dark and light app themes, and Xamarin.Forms 4.7 has arrived to make this easy to add to your applications. In fact, if you do nothing at all, your Xamarin.Forms apps will respect the user’s OS preference. Why stop there? You can also customize the light and dark colors used throughout your app UI, and even give the user a choice to control their own app theme. Let’s start at the beginning.

Default Platform Colors

When you set no styles or colors, your UI will default to the theme native to the platform the app runs on. For example, look at how this new “Blank App” template looks on iOS:

            <Frame BackgroundColor="#2196F3" Padding="36,48,36,36" CornerRadius="0">
                <Label Text="Welcome to Xamarin.Forms!" HorizontalTextAlignment="Center" TextColor="White" FontSize="36" />
            <Label Text="Start developing now" FontSize="Title" Padding="30,10,30,10" />
            <Label Text="Make changes to your XAML file and save to see your UI update in the running app with XAML Hot Reload. Give it a try!" FontSize="16" Padding="30,0,30,0" />
            <Label FontSize="16" Padding="30,24,30,0">
                            <Span Text="Learn more at " />
                            <Span Text="" FontAttributes="Bold" />

Image apptheme default

When you toggle the iOS simulator between dark and light modes (CMD+SHFT+A) you can see the ContentPage background shift from white to black, and the text from black to white. Those are default platform colors. Contrast that with the header which remains blue and the header text that remains white. Those are explicit colors set in code.

Take Control of the Dark

To now control the colors for the dark and light of the head and text, you can replace the static colors with an AppThemeBinding that will react at runtime to the OS theme settings. First enable this preview feature by adding the flag to your App.xaml.cs:

public App()
    Device.SetFlags(new string[]{ "AppTheme_Experimental" });


Updating just the header, this looks like:

<Frame BackgroundColor="{AppThemeBinding Dark=#2196F3, Light=#2196F3}" Padding="36,48,36,36" CornerRadius="0">
                <Label Text="Welcome to Xamarin.Forms!" HorizontalTextAlignment="Center" TextColor="{AppThemeBinding Dark=DarkBlue, Light=White}" FontSize="36" />

Image apptheme explicit

You can of course refactor these to styles like this:

    <Style x:Key="HeaderBg" TargetType="Frame">
        <Setter Property="BackgroundColor" Value="{AppThemeBinding Dark=#1d1d1d, Light=#2196F3}"/>
        <Setter Property="Padding" Value="36,48,36,36"/>
        <Setter Property="CornerRadius" Value="0"/>

    <Style x:Key="HeaderTitle" TargetType="Label">
        <Setter Property="TextColor" Value="{AppThemeBinding Dark=#F1F1F1, Light=White}"/>
        <Setter Property="HorizontalTextAlignment" Value="Center"/>
        <Setter Property="FontSize" Value="36"/>

<Frame Style="{StaticResource HeaderBg}">
        Style="{StaticResource HeaderTitle}"
        Text="Welcome to Xamarin.Forms!" />

#xamarin #xamarin platform #xamarin.forms #xaml #app themes #mobile applications #xamarin developers

Setting up Mobile Development Environment for Xamarin Forms in Visual Studio 2019


#xamarin forms #xamarin forms tutorial for beginners #xamarin forms with c# #xamarin