Section View in Windows8 Listview? - windows

How can i implement a Section View(like in IOS) in Windows8 ListView ?
I want to break down the Listview into different Sections.
Any Directions ?

ListViews have a property called groupDataSource that lets you define how the items are grouped. You might want to look at the Grid App template in Visual Studio, which has data already set up in this way. You can also take a look at this tutorial: http://msdn.microsoft.com/en-us/library/windows/apps/hh465464.aspx
If you want any more info, you will have to be a bit more specific with your line of questioning.

In my Netflix post on codefoster.com I tried to show grouping in its simplest form. When you have a JS array, you simply make a Binding.List out of it and then you just call createGrouped sending it two lambda functions telling it how to group. Then like #Paul said, you'll get those different sections automatically in your ListView. Hope that helps.

Related

Accessing NativeScript ListView itemTemplate contents

I’m using a NativeScript <ListView> and I’m trying to get access to the individual elements in each element’s <ListView.itemTemplate>. To give a concrete example, given this code snippet, how do I access each <GridLayout>?
<ListView>
<ListView.itemTemplate>
<GridLayout>...</GridLayout>
</ListView.itemTemplate>
</ListView>
I know that I can add a loaded event to each <GridLayout>—i.e. <GridLayout loaded="myEventHandler">—however, for my use case I need to change attributes on the <GridLayout> after an unrelated event occurs.
Theoretically I could use the loaded event to build an array of all <GridLayout>s in a <ListView.itemTemplate>, and then use that array to perform actions, but that just seems hacky. It seems like there has to be a better way. Any ideas?
Manipulating the visual tree for a list view item doesn't seem like the most robust approach here. Consider the following scenario:
An item gets rendered to the screen.
Your code kicks in and modifies the visual container's tree.
The user scrolls, or something else happens, and the list view reuses the visual container for another item. Your new item now looks broken.
I'd implement this using bindings and, if things get hairy, an appropriate view model that makes bindings straightforward.
You can use the nativescript-dom plugin. The getElementsByClassName actually has code to traverse the ListView's children. Unfortunately after I discovered the issue and put in the bug report into the NS Common Components repo -- I totally forgot to make the same changes to the getElementsByTagName and getElementById functions in the nativescript-dom plugin.
So using getElementsByClassName if you assign it a class name should work right now. Otherwise; I'll probably do an update to the library later this week that will have the listview children traversal code in it for the other two methods.
Update: I've released a new version of nativescript-dom that allows all three getElement* to work on ListView children.
I think you may be able to give the each gridview and id dynamically using something like id="gridView{{$index}}" then use page.getViewById('gridView1') for example. Can't test it out at the moment, but I think that would work.

How to highlight Outlook contacts

Is there a way how to display some contacts from Outlook's contact list in different manner?
So far I've seen, that there is quite some customization available for Office applications, however I haven't seen anything even remotely close to this functionality.
No, there is no way to display Outlook contacts in a different color.
Well, indeed this is what I found - it is possible only via adding of the new AutoFormatRule to the Outlook.TableView.
Sample code would be something like:
Outlook.AutoFormatRule autoFormatRule = tableView.AutoFormatRules.Add("My own rule");
autoFormatRule.Font.Bold = true;
autoFormatRule.Font.Strikethrough = true;
autoFormatRule.Filter = <filtering>;
tableView.Save();
tableView.Apply();
For filling in 'filtering' part one can use DASL Queries
But I still need to figure out what to do with the non-list views.
I can suggest only one possible way - replace the default folder view with a custom form where you can display entries in the way you need. See Creating Adjacent Windows In Outlook for more information.
Also you may consider using Add-in Express. They provide such layouts out of the box. See Advanced Outlook view and form regions.
Note, you can use any .net controls on top of custom forms.

Drag&Drop list that sets model properties based on order?

I'm trying to implement a list of items on a web page in which each item on the list is reorder-able via drag and drop. The current placement of an item within the list should set an 'interest' property on the item's model.
I've never built anything like this before and not really sure where to start or what approach to take. Any guidance would be very helpful!
You can use acts_as_list gem to simplify reorder process at backend, and jQuery.sortable at frontend
I found this walkthrough which was very helpful:
http://webtempest.com/sortable-list-in-ruby-on-rails-3-almost-unobtrusive-jquery/

WP7 Changing 1 layout element based on another

Having no luck here trying to find a solution to this.
I've set up a looping selector based on this guide. (I also used the ListLoopingDataSource class in Part 2 in order to have strings in my looping list).
What I want to be able to do is then change another element (an image box/placeholder) on my layout, based on what is currently selected in the looping selector.
No real idea how to do this, the onSelectionChanged event is kind of abstracted and not really useful? I'm not sure how to programmatically change images either, it doesn't look like I can access a resource from the code base, only from the xaml.
Any help/suggestions would be greatly appreciated.
I found that I could do this by using binding.

changing navigation in magento dynamically

I want to know that can i change the navigation menu dynamically,i am having two tabs on the basis of which i want to render the navigation menu.How can it be done
Thanks in advance
For usability reasons, the global navigation generally shouldn't change. Users will expect to see the same options available to them and will get confused (and leave) if they aren't.
Could you explain the requirement more?
EDIT:
Usability issues aside, try adding all necessary items to the top nav, then use Javascript to toggle between tabs. If you don't want to change the navigation PHTML files to add IDs to them, you can use the existing classes to target which nav items to show and which to hide.
Since Magento stores cannot function without JS anyway, you should be pretty safe with that solution. Preferably, you can change the top nav's template (I believe app/design/frontend/base/default/template/page/template/links.phtml in 1.4) to use IDs for those LIs as well, in which case you can target those instead.
Thanks,
Joe

Resources