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

Delegate 'System.Action' does not take 0 arguments using XLabs.Forms

$
0
0

Using Xamarin.Forms 1.3.1.6296 and XLabs.Forms 2.0.0-pre91 I get a wierd error if I use the INavigationService.NavigateTo in a ViewModel inherited from XLabs ViewModel using Visual Studio 2013 Ultimate.

Clean install, a ViewModel with a single command that contains a call to Navigation.NavigateTo() will give you a "Delegate 'System.Action' does not take 0 arguments" error in the error list. The project will compile and run any way, which leads me to believe that it's IDE related.

If you uncomment the line the error disappears.

I just wanted to run it by everyone here before submitting a bug.

public class MainViewModel : ViewModel
{
    public ICommand TheAction
    {
        get
        {
            return new Command(() =>
            {
                // Uncomment line below and the error "Delegate 'System.Action<object>' does not take 0 arguments" disappears.
                Navigation.NavigateTo<SecondPage>(); 
            });
        }
    }
}

Reprod project
https://dl.dropboxusercontent.com/u/48287660/Reprod.zip

Any thoughts?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>