Skip to content

Instantly share code, notes, and snippets.

View alexshikov's full-sized avatar

Alexey Shikov alexshikov

  • Diversido
  • Kiev, Ukraine
View GitHub Profile
@alexshikov
alexshikov / Example.cs
Last active June 11, 2019 01:57
MvxBundle extension to pass objects between ViewModel
public void OpenDetails ()
{
var bundle = new MvxBundle ();
bundle.WriteByTypeAsync (Place); // object type name is used as a stored key
bundle.WriteBoolAsync(IsInMyGuides); // "System.Boolean" is used as a key
ShowViewModel<PlaceViewModel>(bundle);
}
protected async override void InitFromBundle (IMvxBundle parameters)
@alexshikov
alexshikov / DroidPresenter.cs
Last active December 16, 2015 15:08
Show fragment as screen in MvvmCross
public class DroidPresenter : MvxAndroidViewPresenter
{
private readonly IMvxViewModelLoader _viewModelLoader;
private readonly IFragmentTypeLookup _fragmentTypeLookup;
private IFilterSliderHost _filterSliderHost;
private TaskCompletionSource<IFragmentHost> _taskSource;
private WeakReference<MvxDialogFragment> _lastDialog;
@alexshikov
alexshikov / gist:3ece7abbd2779077158a
Last active August 29, 2015 14:20
Simple APNs registration
[Register ("AppDelegate")]
public partial class AppDelegate : ApplicationDelegate
{
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
// common logic here
SetupPushNotifications (options);
return true;
}