iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I've developed my first app in Android using Crosslight.
One of the activities of my app is a "DrawerViewModelBase". It has a "ListViewModelBase" in the center, and a "EditorViewModelBase" in the right side. The "EditorViewModelBase" is a Form.
public ValesDrawerViewModel() { this.CenterViewModel = new ValeListViewModel(); this.RightViewModel = new FiltroEditorViewModel(); }
Right side is a filter that, when it is closed, updates the items of the center. To control this event, in Close method of "DrawerViewModelBase", I get new items in the CenterViewModel.
public override void Close() { if (this.OpenedDrawer == DrawerSide.Right) { GetValesAsync(); } base.Close(); } protected virtual async void GetValesAsync() { ... ((ValeListViewModel)this.CenterViewModel).Items = selectResult; ... }
In Android is OK, but in iPhone, when I Close the right side, it doesn't enter in Close method and it doesn't update items.
How can I solve this problem?
How can I send data between CenterViewModel and RightViewModel?
Hi Cristobal,We suggest you to use this method rather than overriding close:
protected override void OnPropertyChanged(string propertyName) { if (propertyName == "IsOpen") { if (this.IsOpen) { //do something when the drawer is opened } else { //do something when the drawer is closed } } base.OnPropertyChanged(propertyName); }
The reason is close method actually used for closing the drawer, if you just want to check if the drawer is closed or not, it is better to use IsOpen like code snippet in above.For iOS i will inform our developer about this issue under code CROS-819, i will update you with the new information regarding this issue.Best Regards,Arief
Thank you Arief for your answer. Unfortunately this answer is not valid.
IsOpen is a property with get only, so that it doesn't use OnPropertyChange method.
If you put a breakpoint after of the conditional "if(property Name == "IsOpen")", the flow doesn't enter here.
I've tried too this solution in the Drawer Sample code, but it doesn't work either.
I look forward to your reply as soon as possible.
Hi Cristobal,Actually, the method i give you is just a better way to manipulate drawers in Android (if you using Close it will also close the drawer so it is better using IsOpen)About iOS version, In Android version however Google already give implementation for manipulating Drawer state but for iOS the function is still not yet implemented and also in the current version of Crosslight which also have been reported to our developer as a feature request under code CROS-816.
Nevertheless i will still try to help you to find alternative for iOS version of Drawer.Also sorry for confusing wording.Best Regards,Arief
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname