I want to create a popup using a plugin called rg.plugin.popup on mvvmcross, But don't know how to implement it. I've tried it on regular xamarin.form and it works.
This is what I've tried to navigate it on MVVMCross:
public IMvxCommand OnFilterLabel
{
get
{
return new MvxCommand(async() =>
{
await Navigation.PushPopupAsync(new FilterAttendPopup());
MessagingCenter.Subscribe<Attendance>(this, "ReceiveData", (value)=> { });
});
}
}
but I get this error: "Error CS0103 The name 'Navigation' does not exist in the current context"
Your help is very appreciated ^_^
You can use "PopupNavigation.Instance" instead of "Navigation". You have to initialize this navigation:
https://github.com/rotorgames/Rg.Plugins.Popup/wiki/Getting-started#initialization
public IMvxCommand OnFilterLabel
{
get
{
return new MvxCommand(async() =>
{
await PopupNavigation.Instance.PushAsync(new FilterAttendPopup());
MessagingCenter.Subscribe<Attendance>(this, "ReceiveData", (value)=> { });
});
}
}
If you want to use "Navigation", you have to add this using :
using Rg.Plugins.Popup.Extensions;