I have looked at the examples and I see that all of them display (render) one list of data. Is there an example of how to make a menu that makes it possible to select between displaying two lists of data ? I have modified the Social media example and want to extend the menu there to list contacts, messages. I have copied and modified the NewsItem.ux to display contacts. But how do I add this to the Sidebar.ux ?
Well in general I’m asking for a more complete app example. The examples that are there now explain different concepts, but not how to use fuse to build an app.
If you did this then it would be easy to figure out:
How to split a ux and js files: There must be some best practice in this.I looked at the Social media example. Here I wanted to reduce the size of the Myapp.ux file. Now the file is hard to read for a novice. A natural thing would be to put all the sidemenu stuff in one piece of code. Eg. The:
"Sidebar Width=“250” ux:Name=“menu” EdgeNavigation.Edge=“Left”… definition at the top has a relation to the code: Panel Margin=“7,5,5,5” Height=“32” Width=“32” HitTestMode=“LocalBounds” Clicked "
I tried to put this stuff in a separate file. As I do not want to look at details on how the hamburger icon transforms to an X in the main() part of code. I got error messages and was not able to figure out how to do this.
Definitions - where to place them:
I modified NewsItem.ux and created Contacts.ux just by following the logic. But I ran into some problems because of some definitions. The compiler complained that eg. SubText already was defined in NewsItem.ux Eg. The line in NewsItem.ux:
" Text ux:Class=“SubText” Alignment=“VerticalCenter” FontSize=“12” TextColor="#7a96b2" "
In the copy Contacts.ux I just commented out the definition. Now it works. But It is messy to have definitions that are used in both .ux files in one of them. The best would be to keep all these definitions in one place (file) so that the code is clean and easy to read.
This is what I can think of now. I’m impressed by Fuse and I like it. I see that this is just version 0.11. I think version 1.0 will be great and I’m prepared to struggle a bit creating my prototype using Fuse.
Regards Terje