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
Hello Crosslight Support,
I have a problem with the VisibilityBinding attribute on iOS.
I have the following code in the form metadata class:
[Editor(EditorType.Label)] [Layout(Style = LayoutStyle.DetailOnly)] [VisibilityBinding(Path = "HasReminder")] public string ReminderInfo;
The visibility of this property depends on the "HasReminder" bool property of the belonging model class, but "HasReminder" is not displayed via the form metadata class.
When a certain action is triggered, I set the "HasReminder" value in the ViewModel and I call:
this.Item.RaisePropertyChanged(() => this.Item.ReminderInfo);
This works an Android but does not on iOS. When the "ReminderInfo" text should be visible, no additional row appears. When I leave the view and navigate back, the row appears.
When the "ReminderInfo" text should disappear, the text is cleared, but the row is still shown. When I leave the view and navigate back, the row is gone.
Any advice or fix?
Thanks,
Thomas
Apologize for the delay in sending this.
I started my investigation by modifying basic-inventory sample of Crosslight.
The changes are:
I set HasReminder to true when user edit an item (parameter.Data != null. not new item). The SoldDate appear as expected. Try to add the VisibilityBinding attribute to another editor control (which EditorType is TextView) also works without problem.
I uploaded my sample, VisibilityBinding_Sample.zip, in OneDrive. Please have a look at the sample and feel free to let me know if you find anything that I might miss during my attempt in order to reproduce the problem.
Hello Yudi,
Thank you for the sample. You did it almost like I did. Please, make the following changes to reproduce the problem:
Item.FormMetadata.cs: Move the Sold section up to appear directly under the general section. This is for better visibility only.
[Section(Style = SectionLayoutStyle.ImageWithFields)] public static GeneralSection General; [Section("Item Status")] [VisibilityBinding(Path = "IsNewItem", SourceType = BindingSourceType.ViewModel, ConverterType = typeof(BooleanNegateConverter))] public static SoldSection Sold;
ItemEditorViewModel.cs: Remove this.Item.HasReminder = true; from Navigated. Change
private void ExecuteViewLargeImage(object parameter) { this.Item.HasReminder = !this.Item.HasReminder; //this.NavigationService.Navigate(new NavigationTarget(typeof(ItemDetailViewModel), "PhotoDetail", new NavigationParameter(this.Item))); }
After applying these changes start the app. Select a list item. No sold date is visible which is OK. Execute View Larger command through the image picker. No sold date is visible. Navigate back to the list and select the same item again. Now, the sold date is visible. Execute View larger. Sold date is still visible. Navigate back to the list and select the same item again. Sold date is gone.
So, doing the binding in on Navigated works, because you are in an early stage. But after the view is created the binding has no effect.
I hope this helps to reproduce the problem.
As usual you will create a new CROS ticket for the dev team after reproducing the bug. This is the way it should be. The worse thing about it is that it will take weeks or months to get the fix. Currently there is no public release schedule for Crosslight and no feature roadmap. This is a bad situation for Crosslight developers. Please, keep up a reliable release cycle of 4 weeks like you did with Update 1 and 2 of Crosslight 5.
This problem has been forwarded to Crosslight development team and submitted under CROS-1171. I will keep this thread updated with any news I heard from the team regarding this.
As usual you will create a new CROS ticket for the dev team after reproducing the bug. This is the way it should be. The worse thing about it is that it will take weeks or months to get the fix.
Sorry for any inconvenience this problem may have caused you. I will informed this to the team to consider your concern. Again, thank you for the valuable feedback.
When will this be fixed? When will there be a new stable version of Crosslight?
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