Windows 8 GridView - show two items per time - xaml

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).

Related

LongListSelector in WP8

I am trying to create my first WP8 application. I have good experience on Silverlight & WPF however this is not a cake for me which I expected :(.
I am making a Create Employ Form in which user entered different information of the employ. I need to show Country List Combobox. I noticed that in WP8, I will have to use LongListSelector but I am confused that how will I display it with my other textboxes etc control into the FORM. LongListSelector work on the full page but I want to show it like a ComboBox in simple window form application.
I know this is very basic question but I will appreciate for your help.
you cant use combobox in wp8 ...
you can use ListPicker it is a new control introduced in wp8 toolkit...
in this if your list contains less than 5 members than it will show it as dropdown otherwise it will show it as a list on a different page.
Set the Height and Width properties for Lonlistselector or otherwise change the control ListPicker simmler to CombooBox.

Synchronizing two ListViews in WinRT

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.

windows 8 app page that has list and details

I am now designing a page for a windows 8 app.
the page has 2 parts, the left part will be like a list, when user select one item in the list, the right part will show the content based on the selection.
but I want to select different item in the left will display the different data in the right. For example, maybe select first item in the list, some text blocks will display on the right. select second item , an image will display on the right.
the data in the behind is a class which has some properties. I just want show this properties based on the selection in the list
so how to implement this? anyone has any idea?
thanks!
In the item template, create controls in separate panels for each different data type: text, image, video, etc. Then you can use a converter on each panel to inspect the data that it is bound to and show/hide the panels where appropriate. Depending on your data source, you might be evaluating either the class type or a property that contains an enumerated value that reveals the type, or maybe some more complex evaluation of the state of the class's properties.
One of the templates that comes with Visual Studio Express for Windows 8 supports this list and details view - look at the Split App template.
For more information, see:
http://msdn.microsoft.com/en-us/library/windows/apps/hh738343.aspx

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.