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 want to create a MultiPageViewModel that I don't know how many tab have.
Inside of ViewModel I request to webservice the number of tabs should have my MultiPageViewModel.
After, i try to create my NavigationItems with this response.
public override void Navigated(NavigatedParameter parameter) { GetCategories(); this.UpdateResources(); }
public async void GetCategories() { try { this.ActivityPresenter.Show("Cargando los datos del socio...", ActivityStyle.LargeIndicator); var result = await Repository.GetCategories(); if (result != null) { List items = new List(); foreach (var category in result) { items.Add(new NavigationItem(string.Format("{0}({1})", category.Category, category.News), typeof(TabsListViewModel))); } this.Items = items.ToArray(); this.UpdateResources(); } } catch (Intersoft.Crosslight.RestClient.HostUnreachableException) { this.MessagePresenter.Show( "Connection error..."); } catch (Exception ex) { this.MessagePresenter.Show("Error: 0x0002"); } finally { this.ActivityPresenter.Hide(); } }
Hi Cristobal,I will ask this to our developer, but as far as i know it will be very hard and maybe impossible because android need to count the width first which actually done in when initializing, so if you dynamically add new tab, i don't think it is possible.But i will report back to you and hopefully create a sample for this scenario.If you want you could tell us your scenario, maybe we can helps give a better, safer alternative and more compliance with standard of each platform.Best Regards,Arief
My MultiPageViewModel is a news view, and the number of categories can be changed (for example, news currently has three categories, tab of present , tab of novelties and tab of General News). I want to make a dynamic MultipageViewModel because the app could have new tabs in a near future.
All the tabs contain a ListViewFragme with the same structure (only with a change in the news inside)
The tabs are in the rest request (similar to this)
{Category: "GENERAL", News: 9 }, { Category: "ACTUALIDAD", News: 31 }, { Category: "NOVEDADES", News: 10 }
Hi Cristobal,
Good new for you! yes it was possible please check the sample for detail:
https://onedrive.live.com/download?resid=9F657B5249D6BB8D!113&authkey=!AM5urVz4hrhh4CI&ithint=file%2czip
Hi Cristobal
Did you mean it won't work in iOS?
I will check it and report back to you.
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