Synchronizing two ListViews in WinRT - xaml

I'm trying to synchronize the selected items of two different ListViews in a WinRT application, so that selecting an item(s) in one selects the same in the other. Both lists are bound to the same data source.
I thought that you could use the IsSynchronizedWithCurrentItem property of the ListView to manage synchronization, but this always seems to throw an exception when I try it ("Setting IsSynchronizedWithCurrentItem to true is not supported"), and anyway is perhaps not intended for use with multiple selected items.
Is there a way to programmatically select items in a given ListView in WinRT? Or what is the correct way to keep the selected items on two lists synchronized?

Take a look at the WinRT XAML Toolkit. It has a sample for ListViewExtensions in the samples app that seems to do almost exactly what you ask for.

Related

VB.NET - How to Create Information Box

I'm creating a form that will display a long list of properties and their associated value. I'd like to display them in a sort of table-like control. Something with heading values at the top and a list of organized data underneath it. Something like these:
I realize those 2 examples aren't exactly the same but I'm flexible on what I produce as long as it gives a similar effect. My question is, how do I create a list like that? Is there a control in the Visual Studio toolbox that will produce this effect?
I'm sure there's something similar that easy to find but I can't figure out what to call that control so my searches haven't turned up anything useful.
Any help would be greatly appreciated. Thanks!
A combination of ListView and TabControl controls could be used to emulate what you're showing above. See the links for ListView and TabControl to help you get started.
Yes, there are windows form controls that provides this functionality.
For the tabbed windows use the TabControl:
For the different lists use a ListView control in the mode Details - which means a list with columns:
For the second feature, the ListView control has the Group features:
In order to group items togheter set the group for the chosen item(s):
All of this can be of course done programatically. There are good tutorials on MSDN and Channel9.

Windows 8 GridView - show two items per time

I need to implement a sort of book using the GridView Control.
In particular I'm looking for a way to display only 2 items per time and still to be able to scroll the whole list using scrollbars.
Your question isn't very clear, but I'm assuming you are asking how to ask 2 rows or columns of blocks to your application.
Have a look at the default new Metro app template. It's hub page has a multi-line gridview. The key is to use a WrapGrid, or VariableSizedWrapGrid to display your items. In the example, a gridview is used, but then the wrapgrid is used as the item template (used for each group of items).

Silverlight ListBox DataTemplate

I have a Silverlight 4 ListBox with a created DataTemplate attached to it that correctly shows the items I want.
I would like to be able to have each Item in the list display differently according to a value in the object that is represented by the DataContext. I was originally looking at altering the DataTemplate on a per item basis, but I think my logic here is flawed.
What is the best way to approach this? Is a Listbox the best way to represent the collection given that I want a potentially different look per item?
I think ur looking for template selector in Silverlight .
Please follow below url http://www.codeproject.com/KB/silverlight/SLTemplateSelector.aspx
-Mahender

Create List of Control Groups in VB.Net?

I'm building an control interface for a system that consists of 1-4 modules. In my interface, each module has its own control set, grouped in a groupbox. I only want to show the control groups for the modules that are actually connected and hide the rest.
This is easy to do with the visble property.
I also want all of the groups to be stacked vertically in the UI such that when one is hidden, the rest below it shift up into its place as if you deleted a row in a table. It needs to be able to come back just as easily.
How can I do this or something similar in VB.Net?
The FlowLayoutPanel control does this automatically. Just put the group boxes inside of it.

Best way to select from a list - aren't the two listboxes getting a little old?

How many times have we seen this type of selector:
List Box Selector http://geekswithblogs.net/images/geekswithblogs_net/dotNETvinz/MoveItemsListBox.jpg
I was just about to start creating this in a WinForms app, when I thought that others may have some ideas for doing this better. We need it to sort - so the right hand list will need up/down buttons. But this seems so old school. I love devexpress components, and was thinking of asking them if they would consider adding a component that handles this functionality with a slick UI.
I am thinking that a graphical representation of the objects, and a graphical representation of the listboxes - that would be a more intuitive way to move items around.
Has anyone seen an open source project like this?
If a CheckListBox won't suffice (and it usually will), then the "modern" approach would be to use a ListView or similar component with a "Transfer" column. Render the button inline in that column, one for each row, so that it only takes one click to move an item from one to the other.
You see this everywhere in Vista, usually with hyperlinks as opposed to buttons. Instead of clicking on an item and then choosing an action, you click the action at the item level.
I wouldn't go overboard with slickness as it can impair functionality, but the dual-listbox screen is definitely old-school.
Also, if there's a very large amount of data to manage, it helps to provide a progressive search at the bottom of one or both lists.
I have done this type of selection using (essentially) a single CheckListBox that displays each item as an image. Part of the image looks like a LED, which is on (bright) if the item is selected or off (dark) if it is not selected.
This works well if you have a reasonable amount of data to select from, and also works well in a multi-column format if you can predict that the options will have reasonably similar lengths.
Allow users to drag items in/out of list 2, and also drag to reorder in list2.
(All items dragged out of list2, and dropped anywhere outside the list, get put back into list 1, in their correct place in the list by alphabetical or natural order.)
You can merge the two list boxes into one with the help of groups (LVGF_GROUPID flag): one group for selected and one for not selected.
You can also implement group membership changes with drag-drop between them. This way single drag-drop can move an item into the other group at the appropriate position, saving most/all of the other buttons.
Additionaly the bottom of each group can have one pseudo item with help text (i.e. "Drag items here to...") that is visible only when relevant.