Comments (4)
It's always worked well for me. Sounds like a user dialogs issue?
On Wednesday, 25 November 2015, MBrekhof [email protected] wrote:
I'm using Arc.Userdialogs together with FreshMvvm which works well with
one exception: the messages(toasts) appear and reappear as if there is an
additional refresh/repaint by FreshMvvm.Did you ever use Arc.Userdialogs with FreshMvvm and are there any gotchas
or whatever?—
Reply to this email directly or view it on GitHub
#23.
Michael Ridland | Technical Director | Xamarin MVP
XAM Consulting - Mobile Technology Specialists
Blog: www.michaelridland.com
from freshmvvm.
I'll ask them also, just in case:
This works as expected:
[ImplementPropertyChanged]
public class GebruikerPageModel : FreshBasePageModel
{
IDatabaseService _databaseService;
private IUserDialogs _userDialogs;
public Gebruiker gebruiker { get; set; }
public GebruikerPageModel(IDatabaseService databaseService,IUserDialogs userDialogs)
{
_databaseService = databaseService;
_userDialogs = userDialogs;
}
public override void Init(object initData)
{
....
}
public Command SaveGebruiker
{
get {
return new Command(() =>
{
if (!CrossConnectivity.Current.IsConnected)
{
_userDialogs.ErrorToast("Probleem", "Geen werkende Wifi verbinding", 5000);
}
else
{
List<Inbox> testboxes = _databaseService.GetInboxes();
if (testboxes?.Count == 0)
_userDialogs.ErrorToast("Probleem", "Geen inboxen gevonden, gegevens correct?", 5000);
else
{
_databaseService.SaveGebruiker(gebruiker);
App.CurrentUser = gebruiker;
}
}
CoreMethods.PopPageModel(gebruiker);
});
}
}
}
This produces some red flashes:
[ImplementPropertyChanged]
public class InboxListPageModel : FreshBasePageModel
{
IDatabaseService _databaseService;
IUserDialogs _userDialogs;
private string inboxesHeader = "Inboxen";
public string InboxesHeader
{
get { return inboxesHeader; }
set { inboxesHeader = value; }
}
public InboxListPageModel(IDatabaseService databaseService, IUserDialogs userDialogs)
{
_databaseService = databaseService;
_userDialogs = userDialogs;
}
public ObservableCollection<Inbox> Inboxes { get; set; }
public override void Init(object initData)
{
Gebruiker gebr = App.CurrentUser;
if (App.CurrentUser == null)
{
_userDialogs.ShowError("Geen Digidoc ID ingevuld.", 3000);
}
else
{
if (String.IsNullOrEmpty(App.CurrentUser.Naam))
_userDialogs.ShowError("Geen correcte Digidoc ID ingevuld.", 3000);
}
if (!CrossConnectivity.Current.IsConnected)
{
_userDialogs.ErrorToast("Probleem","Er is geen Wifi beschikbaar", 3000);
}
}
....
from freshmvvm.
You should really be loading a dialog during the init method. Normally I
never have to do that, dialogs are shown in commands.
On Thursday, 26 November 2015, MBrekhof [email protected] wrote:
I'll ask them also, just in case:
This works as expected:
[ImplementPropertyChanged]
public class GebruikerPageModel : FreshBasePageModel
{
IDatabaseService _databaseService;
private IUserDialogs _userDialogs;
public Gebruiker gebruiker { get; set; }public GebruikerPageModel(IDatabaseService databaseService,IUserDialogs userDialogs) { _databaseService = databaseService; _userDialogs = userDialogs; } public override void Init(object initData) {
....
}public Command SaveGebruiker { get { return new Command(() => { if (!CrossConnectivity.Current.IsConnected) { _userDialogs.ErrorToast("Probleem", "Geen werkende Wifi verbinding", 5000); } else { List<Inbox> testboxes = _databaseService.GetInboxes(); if (testboxes?.Count == 0) _userDialogs.ErrorToast("Probleem", "Geen inboxen gevonden, gegevens correct?", 5000); else { _databaseService.SaveGebruiker(gebruiker); App.CurrentUser = gebruiker; } } CoreMethods.PopPageModel(gebruiker); }); } }
}
This produces some red flashes:
[ImplementPropertyChanged]
public class InboxListPageModel : FreshBasePageModel
{
IDatabaseService _databaseService;
IUserDialogs _userDialogs;private string inboxesHeader = "Inboxen"; public string InboxesHeader { get { return inboxesHeader; } set { inboxesHeader = value; } } public InboxListPageModel(IDatabaseService databaseService, IUserDialogs userDialogs) { _databaseService = databaseService; _userDialogs = userDialogs; } public ObservableCollection<Inbox> Inboxes { get; set; } public override void Init(object initData) { Gebruiker gebr = App.CurrentUser; if (App.CurrentUser == null) { _userDialogs.ShowError("Geen Digidoc ID ingevuld.", 3000); } else { if (String.IsNullOrEmpty(App.CurrentUser.Naam)) _userDialogs.ShowError("Geen correcte Digidoc ID ingevuld.", 3000); } if (!CrossConnectivity.Current.IsConnected) { _userDialogs.ErrorToast("Probleem","Er is geen Wifi beschikbaar", 3000); } }
....
—
Reply to this email directly or view it on GitHub
#23 (comment).
Michael Ridland | Technical Director | Xamarin MVP
XAM Consulting - Mobile Technology Specialists
Blog: www.michaelridland.com
from freshmvvm.
Shouldn't
On Thursday, 26 November 2015, Michael Ridland [email protected] wrote:
You should really be loading a dialog during the init method. Normally I
never have to do that, dialogs are shown in commands.On Thursday, 26 November 2015, MBrekhof <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:I'll ask them also, just in case:
This works as expected:
[ImplementPropertyChanged]
public class GebruikerPageModel : FreshBasePageModel
{
IDatabaseService _databaseService;
private IUserDialogs _userDialogs;
public Gebruiker gebruiker { get; set; }public GebruikerPageModel(IDatabaseService databaseService,IUserDialogs userDialogs) { _databaseService = databaseService; _userDialogs = userDialogs; } public override void Init(object initData) {
....
}public Command SaveGebruiker { get { return new Command(() => { if (!CrossConnectivity.Current.IsConnected) { _userDialogs.ErrorToast("Probleem", "Geen werkende Wifi verbinding", 5000); } else { List<Inbox> testboxes = _databaseService.GetInboxes(); if (testboxes?.Count == 0) _userDialogs.ErrorToast("Probleem", "Geen inboxen gevonden, gegevens correct?", 5000); else { _databaseService.SaveGebruiker(gebruiker); App.CurrentUser = gebruiker; } } CoreMethods.PopPageModel(gebruiker); }); } }
}
This produces some red flashes:
[ImplementPropertyChanged]
public class InboxListPageModel : FreshBasePageModel
{
IDatabaseService _databaseService;
IUserDialogs _userDialogs;private string inboxesHeader = "Inboxen"; public string InboxesHeader { get { return inboxesHeader; } set { inboxesHeader = value; } } public InboxListPageModel(IDatabaseService databaseService, IUserDialogs userDialogs) { _databaseService = databaseService; _userDialogs = userDialogs; } public ObservableCollection<Inbox> Inboxes { get; set; } public override void Init(object initData) { Gebruiker gebr = App.CurrentUser; if (App.CurrentUser == null) { _userDialogs.ShowError("Geen Digidoc ID ingevuld.", 3000); } else { if (String.IsNullOrEmpty(App.CurrentUser.Naam)) _userDialogs.ShowError("Geen correcte Digidoc ID ingevuld.", 3000); } if (!CrossConnectivity.Current.IsConnected) { _userDialogs.ErrorToast("Probleem","Er is geen Wifi beschikbaar", 3000); } }
....
—
Reply to this email directly or view it on GitHub
#23 (comment).Michael Ridland | Technical Director | Xamarin MVP
XAM Consulting - Mobile Technology Specialists
Blog: www.michaelridland.com
Michael Ridland | Technical Director | Xamarin MVP
XAM Consulting - Mobile Technology Specialists
Blog: www.michaelridland.com
from freshmvvm.
Related Issues (20)
- CoreMethods PopPageModel() throws exception when page contains CarouselView HOT 1
- using <Path> in XAML throws TinyIoCResolutionException
- ReverseInit not called HOT 1
- XF 5 MasterDetailPage to FlyoutPage HOT 1
- Correct way to handle Button Clicks and updating the model HOT 1
- Hamburger Menu is displayed in the Content Page in Landscape Orientation - Android HOT 1
- Project status and plans for .NET MAUI HOT 10
- Page not loaded properly for PopPageModel using navigation stack in FreshMVVM Xamarin Forms Android HOT 1
- SetBackButtonTextProperty doesn't work HOT 1
- How to intercept software back button press on FreshMVVM PageModel? HOT 3
- v4.0 Release notes?
- SIGABRT: Popped page does not appear on top of current navigation stack, please file a bug. IOS Xamarin HOT 2
- Can not run sample App in VS2019
- Fody Propertychanged on Viewmodels
- PushPageModel does not work after the app ran in the background
- Implement same bevaviour as at PRISM IDestructible HOT 4
- Update view after update bind property in ViewModel
- Cannot resolve IFreshNavigationService from a page loaded from Notifcation tap HOT 1
- FreshMVVM MAUI support
- Issue 'NavGraph cannot be null' with FreshMasterDetailNavigationContainer since MAUI 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freshmvvm.