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
Hi,I believe the question we're supposed to be asking is... what happened to the VisibilityBinding on build 2.0.5000.78? We just closed related thread entitled How to Use Crosslight v2 FormMetaData with EnabledBinding and VisibilityBinding Attributes, within this thread we asked how to use these features. And during that time the code snippet below was working, until the latest update (Update 4 to be specific). Lots of fixes are needed on this update, but also did some damage.
[Section("Commissions", Style = SectionLayoutStyle.RightDetail)] [VisibilityBinding(Path = "DisplayCommissions", SourceType = BindingSourceType.ViewModel, ConverterType = typeof(BooleanConverter))] public static CommissionSection Commissions;
Please try to replicate the issue. Here's the code at Navigated event of the viewmodel. Thanks!
try { // Display an activity indicator. this.ActivityPresenter.Show("Loading...", ActivityStyle.SmallIndicatorWithText, true); // Always check for reachbility before anything else; var p_Result = await this.m_MercuryAdapter.CheckReachabilityAsync(); // Throw a communication exception and handle the exception. if (!p_Result.IsReachable) throw new ReachabilityException(); // Get the setting whether to display commissions on mobile or not. var p_Parameter = await this.m_MercuryAdapter.GetParameterAsync("CommissionsOnMobile"); // Parse and convert the string into a boolean data type. this.DisplayCommissions = Convert.ToBoolean(p_Parameter); } catch { // In case of errors, set a default value. this.DisplayCommissions = false; } finally { // Hide indicator and reset busy state. this.ActivityPresenter.Hide(); this.IsBusy = false; }
The DisplayCommissions property is of boolean type.
I created a test project; and use EnabledBinding and VisibilityBinding feature where the SourceType is set to Model or ViewModel.
Following snippet code shows the summary of how to use these features in a section.
public class SoldSection{ // EnabledBinding with SourceType is set to ViewModel [Editor(EditorType.Switch)] [Display(Caption = "EnabledBinding to VM")] [Binding(Path="IsSold", SourceType=BindingSourceType.ViewModel)] public static bool IsSold; [Display(Caption = "Sold Date")] [Editor(EditorType.Date)] [EnabledBinding(Path = "IsSold", SourceType = BindingSourceType.ViewModel)] [Binding(StringFormat = "{0:d}")] public static DateTime SoldDate; // End of EnabledBinding with SourceType is set to ViewModel // EnabledBinding with SourceType is set to Model [Editor(EditorType.Switch)] [Display(Caption = "EnabledBinding to M")] public static bool IsSold2; [Display(Caption = "Sold Date2")] [Editor(EditorType.Date)] [EnabledBinding(Path = "IsSold2", SourceType=BindingSourceType.Model)] [Binding(StringFormat = "{0:d}")] public static DateTime SoldDate2; // End of EnabledBinding with SourceType is set to Model // VisibilityBinding with SourceType is set to ViewModel [Editor(EditorType.Switch)] [Display(Caption = "VisibilityBinding to VM")] [Binding(Path = "IsSold3", SourceType = BindingSourceType.ViewModel)] public static bool IsSold3; [Display(Caption = "Sold Date3")] [Editor(EditorType.Date)] [VisibilityBinding(Path = "IsSold3", SourceType = BindingSourceType.ViewModel)] [Binding(StringFormat = "{0:d}")] public static DateTime SoldDate3; // End of VisibilityBinding with SourceType is set to ViewModel // VisibilityBinding with SourceType is set to Model [Editor(EditorType.Switch)] [Display(Caption = "VisibilityBinding to M")] [Binding(Path="IsSold4", SourceType=BindingSourceType.Model)] public static bool IsSold4; [Display(Caption = "Sold Date4")] [Editor(EditorType.Date)] [VisibilityBinding(Path = "IsSold4", SourceType=BindingSourceType.Model)] [Binding(StringFormat = "{0:d}")] public static DateTime SoldDate4; // End of VisibilityBinding with SourceType is set to Model }
Hope this helps.
Hi Yudi,
Thanks for the update, however we are referring to VisibilityBinding for a section, not the individual properties.
Please advise. Thanks!
I forwarded this to Crosslight development team to be discussed further. I will get back to you as soon as possible.
Any updates?
This has been forwarded to Crosslight development team as feature request. The request is filed under CROS-580.
I will keep this thread updated with any news I heard from the team regarding CROS-580
The hotfix for CROS-580 is available in Crosslight which will be released soon. I have tested the VisibilityBinding attribute using Crosslight 4 assembly and found that it works as expected.
Hello Yudi,
many bugs like to one mentoined in this thread should be fixed in Crosslight 4. But when will Crosslight 4 finally be released. I am waiting for a couple of bug fixes, too.
Thanks,
Thomas
Hi Thomas,The best estimate we can give is this month along with our new websites, We still doing extensive testing for Crosslight 4 especially it was along with imminent release of VS2015 and Microsoft Edge (it actually affect our samples and Web Components too based from our testing). But the most important we have a new code generator which we must check extensively or it can break samples and our project templates.Hope this helps.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