Comments (7)
I have the same problem too. I can't navigate to StorePage.
App isn't respond. I change to 's', but it still doesn't navigate.
Did you @reader-man figure out with it?
from app-myshoppe.
@Stayrony, well i changed the code to:
Store _selectedStore;
public Store SelectedStore
{
get { return _selectedStore; }
set
{
_selectedStore = value;
OnPropertyChanged("SelectedStore");
if (_selectedStore == null)
return;
if (ItemSelected == null)
{
if (Language.Singleton.Current == Language.C_Lang_En)
page.Navigation.PushAsync(new StorePage(_selectedStore));
else
page.Navigation.PushAsync(new StorePageAr(_selectedStore));
_selectedStore = null;
}
else
{
ItemSelected.Invoke(_selectedStore);
}
}
}
and now its working perfect with me.
but also, try to clean solution, and rebuild it, to make sure that its using the new change.
from app-myshoppe.
@Stayrony it looks that some times it works and others, it doesn't.
After two days of invetigation, found that in "StoreViewModel.cs":
public StoreViewModel(Store store, Page page) : base(page)
{
this.Store = store;
}
that the "this.Store = store" is called twice, and checking the stack strace, it was becuase of this in "App.cs":
public static StoreViewModel StoreViewModel
{
get
{
if (storeViewModel != null)
return storeViewModel;
return null;
//var offline = new OfflineDataStore();
//var task = offline.GetStoresAsync();
//task.Wait();
//var store = task.Result.First();
//storeViewModel = new StoreViewModel(store, null);
//return storeViewModel;
}
}
and as you can see, that most of that function was comented, and now its working.
from app-myshoppe.
My code is correct..
When you set it to null it will deselect the item from the list as I intended.
then when it comes back in it sets it to null and return:
if (selectedStore == null)
return;
from app-myshoppe.
@jamesmontemagno Yes, you are correct about the:
if (selectedStore == null)
return;
But, have u checked the code in "App.cs":
public static StoreViewModel StoreViewModel
{
get
{
if (storeViewModel != null)
return storeViewModel;
return null;
//var offline = new OfflineDataStore();
//var task = offline.GetStoresAsync();
//task.Wait();
//var store = task.Result.First();
//storeViewModel = new StoreViewModel(store, null);
//return storeViewModel;
}
}
As i think, the culprit is there.
from app-myshoppe.
That code is for design time data only and shouldn't be used at all during running the app. Here I will put in a flag.
from app-myshoppe.
Thanks, as this is being run in normal execution time, not just in design time.
from app-myshoppe.
Related Issues (20)
- Why same display for iPad and iPhone? HOT 1
- xamarin.forms.xaml.design and xamarin.forms.core.design missing HOT 5
- Unable to build HOT 7
- Error CS0117
- Can't reference another Project in MyShop project
- AzureDataStore never gets used HOT 1
- Android app not available in my country (USA)
- Issues deploying backend HOT 6
- Can't build app on my iPhone, just test only simulator. HOT 2
- Update for iOS 11
- File not found
- unable to build
- Linked resource does NOT exist HOT 1
- The "XamarinBuildAndroidAarProguardConfigs" task failed unexpectedly. HOT 10
- Credentials
- Missing Assemblies? HOT 1
- BaseViewModel Wrong HOT 3
- Azure package issue HOT 3
- Can't compile the project. HOT 4
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 app-myshoppe.