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
When I enabled ShowSectionHeader and specified SectionHeaderTemplate in the UICollectionView, I found the views in the SectionHeaderTemple (it should be inherited from UICollectionReusableView) cannot perform data binding. Such as UIButton or UILabel, they cannot bind to CommandProperty nor TextProperty.
The views in the TableView header has no problem. Please take a look.
It can be easily reproduce. The ItemCollectionViewHeader is already in the MyInventory WebAPI sample. Add some view to this header and write some binding logic to the ItemListBindingProvider
Hi Leo Hong,
Please make sure that the View (ex:UILabel) have a valid referencing outlet with the same name as the one you have used in binding provider. If the xib have been configured correctly, the following code should be able to help you binding SectionHeader of UICollectionView:
itemBinding.AddBinding("TextLabel", BindableProperties.TextProperty, new BindingDescription("Title"), TargetBindingType.Group);
public override System.Collections.IEnumerable GroupItems { get { return (base.GroupItems != null) ? base.GroupItems : new List (); } set { base.GroupItems = value; } }
public override bool ShowSectionHeader { get { return true; } } public override UIViewTemplate SectionHeaderTemplate { get { return new UIViewTemplate(ItemCollectionViewHeader.Nib); } }
note: ItemCollectionViewHeader should inherited from UICollectionReusableView.
That should allow you to bind the views in SectionHeader.
Best Regards,Leo Chandra
I tried your sample code. It's ok for TextProperty or ImageSourceProperty, but CommandProperty of UIButton still does not work. No matter using AddBinding or AddViewModelBinding.
itemBinding.AddBinding("OKLabel", BindableProperties.TextProperty, "Title", TargetBindingType.Group);
itemBinding.AddBinding("OKButton", BindableProperties.TextProperty, "Title", TargetBindingType.Group);
itemBinding.AddViewModelBinding("OKButton", BindableProperties.CommandProperty, "OKCommand", TargetBindingType.Group);
itemBinding.AddBinding("OKButton", BindableProperties.CommandParameterProperty, ".", TargetBindingType.Group);
We will investigate about this. Will get back on you as soon as I found any update on this.
We have update crosslight to support Command binding to UIButton on group header section. Please find the nightly build here. Please note that you need to use Unified API for it to work.
Best Regards,Leo
It works, thank you
Your welcome.
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