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

An object reference is required to access non-static member `Xamarin.Forms.Page.DisplayAlert

$
0
0

Hello again!

I'm try to use Xamarin.Forms.
I have solution, android project and I've add Forms project as described here - http://forums.xamarin.com/discussion/comment/64979#Comment_64979
But in FormsProxyPage.cs I have error - error CS0120: An object reference is required to access non-static member `Xamarin.Forms.Page.DisplayAlert(string, string, string, string)'

What should I add to my project to have DisplayAlert?

My code is -
...
public async void ForInstanceDisplayAlert()
{

        bool result = await Xamarin.Forms.Page.DisplayAlert ("added forms functionality", "hello from forms", "OK", "Cancel");
        return;

    }

Viewing all articles
Browse latest Browse all 58056

Trending Articles