Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

How to set the background Color in the PCL for the UserDialogs.Toast

$
0
0

Hi:

I have the following code, but is not accepting the Color saying:

Error CS0433 The type 'Color' exists in both 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04fs9cfb79065' and 'Splat, Version=1.6.2.0, Culture=neutral, PublicKeyToken=null'

ToastConfig cfg = new ToastConfig("Cannot post data");
cfg.SetBackgroundColor("System.Drawing.Color.Red");
cfg.Duration = TimeSpan.FromSeconds(20);
UserDialogs.Instance.Toast(cfg);

Is there a way to solve this.

Thanks in advanced for any help.

David


Viewing all articles
Browse latest Browse all 91519

Trending Articles